langchain
6a4ee07e - Fix type hint of 'vectorstore_cls' arg in `SemanticSimilarityExampleSelector` (#1427)

Commit
2 years ago
Fix type hint of 'vectorstore_cls' arg in `SemanticSimilarityExampleSelector` (#1427) Hello! Thank you for the amazing library you've created! While following the tutorial at [the link(`Using an example selector`)](https://langchain.readthedocs.io/en/latest/modules/prompts/examples/few_shot_examples.html#using-an-example-selector), I noticed that passing Chroma as an argument to from_examples results in a type hint error. Error message(mypy): ``` Argument 3 to "from_examples" of "SemanticSimilarityExampleSelector" has incompatible type "Type[Chroma]"; expected "VectorStore" [arg-type]mypy(error) ``` This pull request fixes the type hint and allows the VectorStore class to be specified as an argument.
Author
Parents
Loading