async aadd_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶
Run more texts through the embeddings and add to the vectorstore.
add_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
add_texts(texts: Iterable[str], metadatas: Optional[List[Dict[Any, Any]]] = None, model_id: Optional[str] = None, refresh_indices: bool = False, **kwargs: Any) → List[str][source]¶
Add a list of texts to the Elasticsearch index.
Parameters
texts (Iterable[str]) – The texts to add to the index.
metadatas (List[Dict[Any, Any]], optional) – A list of metadata dictionaries
to associate with the texts.
model_id (str, optional) – The ID of the model to use for transforming the
texts into vectors.
refresh_indices (bool, optional) – Whether to refresh the Elasticsearch
indices after adding the texts.
**kwargs – Arbitrary keyword arguments.
Returns
A list of IDs for the added texts.
async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶