Run texts through the embeddings and persist in vectorstore.
If the document IDs are passed, the existing documents (if any) will be overwritten with the new ones.
add_texts(
self,
texts: Iterable[str],
metadatas: Optional[List[Dict[str, Any]]] = None,
ids: Optional[List[str]] = None,
batch_size: Optional[int] = None,
**kwargs: Any = {}
) -> List[str]| Name | Type | Description |
|---|---|---|
texts* | Iterable[str] | Iterable of strings to add to the vectorstore. |
metadatas | Optional[List[Dict]] | Default: NoneOptional list of metadatas associated with the texts. |
ids | Optional[List[str]] | Default: NoneOptional list of ids associated with the texts. IDs have to be unique strings across the collection. If it is not specified uuids are generated and used as ids. |
batch_size | Optional[int] | Default: NoneOptional batch size for bulk insertions. Default is 100. |