chroma-core / chroma

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

[Feature Request]: Allow specifying custom OpenAI endpoint for embedding with JS client (example : Azure) #2417

Open ansnoussi opened 4 days ago

ansnoussi commented 4 days ago

Describe the problem

Using the provided OpenAIEmbeddingFunction in the chromadb JS client, it's not possible to specify a custom endpoint for the api (unlike the Python equivalent), which is necessary when using Azure OpenAI

Describe the proposed solution

the class OpenAIEmbeddingFunction should allow specifying an Azure endpoint.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

I made a pull request to fix this, and waiting for review: https://github.com/chroma-core/chroma/pull/2227