Adds text documents to the vector store with optional metadata.
Embedded
Python SDK
JS/TS
Parameters
Returns
List[str]: List of IDs for the added textsExample Usage
Parameters
Returns
List[str]: List of IDs for the added textsThe Python SDK supports passing pre-computed embeddings via kwargs for cases where you want to skip the embedding step.
Example Usage
Parameters
Returns
Promise<string[]>: Array of IDs for the added textsThe JS/TS SDK also provides addVectors() for adding pre-computed embedding vectors directly, bypassing the embedding step.
Example Usage
Exceptions
- Throws if length of ids doesn’t match length of texts
Async
The Embedded and Python SDK provide async versions of this method prefixed with a:
JS/TS methods are natively async — all signatures above already return Promise<...>. No separate async variant is needed.