Returns
List of IDs of the added texts.
Return type
List[str]
add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, timeout: Optional[int] = None, batch_size: int = 1000, **kwargs: Any) → List[str][source]¶
Add text to the collection.
Parameters
texts – An iterable that contains the text to be added.
metadatas – An optional list of dictionaries,
text. (each dictionary contains the metadata associated with a) – 
timeout – Optional timeout, in seconds.
batch_size – The number of texts inserted in each batch, defaults to 1000.
**kwargs – Other optional parameters.
Returns
A list of strings, containing the unique identifiers of the inserted texts.
Note
If the collection has not yet been created,
this method will create a new collection.
async adelete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool]¶
Delete by vector ID or other criteria.
Parameters
ids – List of ids to delete.
**kwargs – Other keyword arguments that subclasses might use.
Returns
True if deletion is successful,
False otherwise, None if not implemented.
Return type
Optional[bool]
async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
async classmethod afrom_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, **kwargs: Any) → VST¶
Return VectorStore initialized from texts and embeddings.