langchain.indexes.vectorstore.VectorStoreIndexWrapper¶
- class langchain.indexes.vectorstore.VectorStoreIndexWrapper(*, vectorstore: VectorStore)[source]¶
Bases:
BaseModelWrapper around a vectorstore for easy access.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param vectorstore: langchain.vectorstores.base.VectorStore [Required]¶
- query(question: str, llm: Optional[BaseLanguageModel] = None, **kwargs: Any) str[source]¶
Query the vectorstore.
- query_with_sources(question: str, llm: Optional[BaseLanguageModel] = None, **kwargs: Any) dict[source]¶
Query the vectorstore and get back sources.