mirror of
https://github.com/placeholder-soft/chroma.git
synced 2026-04-29 04:14:59 +08:00
## Description of changes The [collection API docs here](https://docs.trychroma.com/reference/Collection#add) seemed out of date. *Summarize the changes made by this PR.* - Updated the docstring for `Collection.add(...)` method ## Additional questions I see on the [documentation page](https://docs.trychroma.com/usage-guide#adding-data-to-a-collection) (not part of this repo?) that `"Each document must have a unique associated id. Chroma does not track uniqueness of ids for you, it is up to the caller to not add the same id twice."`, but this is not the case. Trying to insert two documents with the same ID results in: ``` chromadb.errors.IDAlreadyExistsError: IDs ['xxxxxxx'] already exist in collection yyyyyyyyy ``` So it does seem like uniqueness is enforced upon insert, and you may want to correct that in docs. Unless I am misunderstanding? --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jeffrey Huber <jeff@trychroma.com>