RoadieHQ / roadie-backstage-plugins

All Backstage plugins created by Roadie.
https://roadie.io
Apache License 2.0
282 stars 408 forks source link

rag-ai-backend-embeddings-openai: configurable URL of the openai endpoint #1469

Open neurohrer-mms opened 4 months ago

neurohrer-mms commented 4 months ago

Feature Suggestion

to connect to some selfhosted or connecting to a openai compatible endpoint we need to have a possibility to add this url in the config (optional).

Possible Implementation

  1. add optional value to configuration
  2. pass the configuration to the OpenAI see https://js.langchain.com/v0.2/docs/integrations/text_embedding/openai
fjudith commented 3 months ago

Hello @neurohrer-mms ,

I'm currently looking to develop a similar feature, but the langchain LangchainJS library does not seems to support endpoint customization embbedings.ts, BUT the OpenAI version does embeddings.py.

neurohrer-mms commented 3 months ago

i think it does. the baseURL property of the configuration parameter (type is ClientOptions). https://v02.api.js.langchain.com/interfaces/_langchain_openai.ClientOptions.html

https://js.langchain.com/v0.2/docs/integrations/text_embedding/openai/#custom-urls

vmahe35 commented 2 months ago

Hello, I am also interested by this feature because I am using a self hosted embeddings with OpenAI compliant interface (provided via VLLM). Thanks

pc-bob commented 1 month ago

This should be complete now @punkle