-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[ENH] add chroma hosted embedding function for qwen #5585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] add chroma hosted embedding function for qwen #5585
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Add Chroma Hosted Qwen Embedding Function to SDKs This PR introduces the Key Changes• Introduced Affected Areas• This summary was automatically generated by @propel-code-bot |
chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py
Show resolved
Hide resolved
chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py
Show resolved
Hide resolved
chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py
Outdated
Show resolved
Hide resolved
clients/new-js/packages/ai-embeddings/chroma-embed/src/index.ts
Outdated
Show resolved
Hide resolved
clients/new-js/packages/ai-embeddings/chroma-embed/src/index.ts
Outdated
Show resolved
Hide resolved
clients/new-js/packages/ai-embeddings/chroma-embed/src/index.test.ts
Outdated
Show resolved
Hide resolved
ec6cf27
to
8af298b
Compare
8af298b
to
d51c0c8
Compare
chromadb/utils/embedding_functions/chroma_embedding_function.py
Outdated
Show resolved
Hide resolved
d51c0c8
to
d29b480
Compare
chromadb/utils/embedding_functions/chroma_embedding_function.py
Outdated
Show resolved
Hide resolved
clients/new-js/packages/ai-embeddings/chroma-embed/src/index.ts
Outdated
Show resolved
Hide resolved
chromadb/utils/embedding_functions/chroma_embedding_function.py
Outdated
Show resolved
Hide resolved
chromadb/utils/embedding_functions/chroma_embedding_function.py
Outdated
Show resolved
Hide resolved
chromadb/utils/embedding_functions/chroma_embedding_function.py
Outdated
Show resolved
Hide resolved
model_id: str = "Qwen/Qwen3-Embedding-0.6B", | ||
task: str = "code", | ||
api_key_env_var: str = "CHROMA_API_KEY", | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not add a query config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref jina embedding function for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not needed in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there will only ever be 2 tasks, one for docs one for queries? just trying to future proof it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no those are targets. tasks are like NL_TO_CODE vs CODE_TO_CODE vs CODE_TO_NL. tasks will presumably be extended in the future
d29b480
to
7237177
Compare
clients/new-js/packages/ai-embeddings/chroma-embed/src/index.ts
Outdated
Show resolved
Hide resolved
In the PDR, it said that CloudEmbeddingFunction should be able to get its API key from the client using it. It doesn't look like your implementation has this feature. |
clients/new-js/packages/ai-embeddings/chroma-cloud-qwen/README.md
Outdated
Show resolved
Hide resolved
4752abf
to
d866593
Compare
chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py
Show resolved
Hide resolved
d866593
to
76cfae0
Compare
chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py
Outdated
Show resolved
Hide resolved
51a61ae
to
bc74f5c
Compare
chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py
Outdated
Show resolved
Hide resolved
bc74f5c
to
852e13d
Compare
imo this is quite a bit of magic and we don't have precedence for anything similar. also, the API is only available if the user is using the cloud client so we wouldn't really have a way to resolve it for local client users. i think we can do it as a fast follow if users request it but it seems fine to rely on a single env var for both your CloudClient and EF since technically the client and EF are separate entities and you don't need a client to create an EF. |
chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py
Outdated
Show resolved
Hide resolved
852e13d
to
419aad4
Compare
419aad4
to
c9fb7da
Compare
…dex.ts Co-authored-by: propel-code-bot[bot] <203372662+propel-code-bot[bot]@users.noreply.github.com>
Adds the Qwen model family hosted on the Chroma embedding service to the known embedding functions in the Python and JS/TS SDKs.
Tested by pointing chromadb to my local OSS dir + running add operations against staging with the real hosted embedding service.