chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
15.3k stars 1.28k forks source link

[Update][Ease of Use] Persistent Embedding Functions #2287

Open atroyn opened 5 months ago

atroyn commented 5 months ago

Persistent Embedding Functions

Chroma's embedding functions (EF) don't persist with collections. This creates awkward API surface area and gotchas like needing to pass an EF if you call get. We are likely to want to persist other parts of pre-and-post processing with collections, as we move closer to implementing pipelines.

API Design

Remove the embedding_function arg on get_collection.

[Complexity] Subtask

atroyn commented 3 months ago

Users may want to change things about the persisted embedding function which don't change the embedding output itself. For example, users might want to update / rotate their API keys.

Maybe we can follow the approach of Configuration in marking certain values static? Thoughts welcome.