langchain.indexes.vectorstore.VectorStoreIndexWrapper¶

class langchain.indexes.vectorstore.VectorStoreIndexWrapper(*, vectorstore: VectorStore)[source]¶

Bases: BaseModel

Wrapper 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.

model Config[source]¶

Bases: object

Configuration for this pydantic object.

arbitrary_types_allowed = True¶
extra = 'forbid'¶