chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Add upsert on Collection

Open atroyn opened this issue 2 years ago • 0 comments

Description of changes

Summarize the changes made by this PR. Adds upsert as a method on Collection. Upsert updates entries in the embeddings store if their ids already exist, otherwise it adds them.

I thought a bit about where to add this and decided that the API level is the right place. I didn't want to couple the use-facing method on Collection, nor did I want to implement upsert operations separately for the database implementations. This seemed like the right place to put it.

Test plan

Added a new test, test_upsert to test_api.py

Documentation Changes

https://github.com/chroma-core/docs/pull/27

atroyn avatar Apr 01 '23 00:04 atroyn