From 55da033b17949bf04818e4c18b46ea7e523f3b72 Mon Sep 17 00:00:00 2001 From: Spike Lu Date: Fri, 23 Aug 2024 17:13:39 -0700 Subject: [PATCH] modify reference --- docs/docs.trychroma.com/pages/reference/js-collection.md | 2 +- docs/docs.trychroma.com/pages/reference/py-collection.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs.trychroma.com/pages/reference/js-collection.md b/docs/docs.trychroma.com/pages/reference/js-collection.md index f4fb3287bfa..e2ca0482e85 100644 --- a/docs/docs.trychroma.com/pages/reference/js-collection.md +++ b/docs/docs.trychroma.com/pages/reference/js-collection.md @@ -51,7 +51,7 @@ const response = await collection.add({ | `params` | `Object` | The parameters for the query. | | `params.documents?` | `string` \| `Documents` | Optional documents of the items to add. | | `params.embeddings?` | `Embedding` \| `Embeddings` | Optional embeddings of the items to add. | -| `params.ids` | `string` \| `IDs` | IDs of the items to add. | +| `params.ids` | `string` \| `IDs` | Optional IDs of the items to add. | | `params.metadatas?` | `Metadata` \| `Metadatas` | Optional metadata of the items to add. | #### Returns diff --git a/docs/docs.trychroma.com/pages/reference/py-collection.md b/docs/docs.trychroma.com/pages/reference/py-collection.md index 7b90fc525e3..8c77c837202 100644 --- a/docs/docs.trychroma.com/pages/reference/py-collection.md +++ b/docs/docs.trychroma.com/pages/reference/py-collection.md @@ -23,17 +23,17 @@ The total number of embeddings added to the database ### add ```python -def add(ids: OneOrMany[ID], +def add(ids: Optiona[OneOrMany[ID]] = None, embeddings: Optional[OneOrMany[Embedding]] = None, metadatas: Optional[OneOrMany[Metadata]] = None, - documents: Optional[OneOrMany[Document]] = None) -> None + documents: Optional[OneOrMany[Document]] = None) -> AddResult ``` Add embeddings to the data store. **Arguments**: -- `ids` - The ids of the embeddings you wish to add +- `ids` - The ids of the embeddings you wish to add. If None, Chroma will generate IDs using uuid v4. - `embeddings` - The embeddings to add. If None, embeddings will be computed based on the documents using the embedding_function set for the Collection. Optional. - `metadatas` - The metadata to associate with the embeddings. When querying, you can filter on this metadata. Optional. - `documents` - The documents to associate with the embeddings. Optional. @@ -41,7 +41,7 @@ Add embeddings to the data store. **Returns**: - None + - `AddResult` - An AddResult object containing IDs. **Raises**: