VectorstoreIndexCreator#
- class langchain.indexes.vectorstore.VectorstoreIndexCreator[source]#
Bases:
BaseModel
Logic for creating indexes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- param embedding: Embeddings [Required]#
- param text_splitter: TextSplitter [Optional]#
- param vectorstore_cls: Type[VectorStore] [Optional]#
- param vectorstore_kwargs: dict [Optional]#
- async afrom_documents(documents: List[Document]) VectorStoreIndexWrapper [source]#
Create a vectorstore index from documents.
- Parameters:
documents (List[Document])
- Return type:
- async afrom_loaders(loaders: List[BaseLoader]) VectorStoreIndexWrapper [source]#
Create a vectorstore index from loaders.
- Parameters:
loaders (List[BaseLoader])
- Return type:
- from_documents(documents: List[Document]) VectorStoreIndexWrapper [source]#
Create a vectorstore index from documents.
- Parameters:
documents (List[Document])
- Return type:
- from_loaders(loaders: List[BaseLoader]) VectorStoreIndexWrapper [source]#
Create a vectorstore index from loaders.
- Parameters:
loaders (List[BaseLoader])
- Return type:
Examples using VectorstoreIndexCreator