chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Feature Request]: updating data based on the changes made in an external source

Open lironrisk opened this issue 2 years ago • 1 comments

Describe the problem

Is there a way to update data in ChromaDB with changes in the documents? I saw the function collection.update(), but using it requires knowing the ID of the exact place in the text that has been changed. Is there any way to update the documents in the database based on the changes made in the data from an external source? The only way I can see of doing it is by using the reset() function on the entire collection and adding the new data.

Describe the proposed solution

a function for in-place update of data

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

lironrisk avatar Nov 22 '23 13:11 lironrisk

@lironrisk there are many edge cases here which is why we try to "stay out of it" - the reset flow works... you could also consider making your ids "mean" something and then use upsert so they don't get re-added. (note that currently naive upsert still means you'll have re-embedded the data)

it's something that we'd like to be able to handle better, but we need to expand the API surface a bit and need to do so thoughtfully

jeffchuber avatar Nov 26 '23 00:11 jeffchuber