chroma
chroma copied to clipboard
fixes: slow listing of collections, pass an optional embedding_function
- avoids unecessary fallback to the default embedding function
Description of changes
Summarize the changes made by this PR.
- Improvements & Bug fixes
- pass an optional
embedding_functiontolist_collectionsto avoid the slow fallback to default embeddings.
- pass an optional
Test plan
- Before this fix, listing collections is slow even when using other embedding functions like OpenAI's one.
- With this fix, if the embedding function is passed, listing collections is instant.
Is it bad practice to store the API Key (for an embedding function) in the database?
@jeffchuber Do you think this can be reviewed/merged ? it would greatly improve the speed of listing collections and does not break the original signature.
@HammadB was this addressed in another way?
We need to rethink this from first principles. One stop-gap may be to change list_collections send back a list of strings.