Support Azure OpenAI authentication in Embabel #1136
Unanswered
huongle1512-commits
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to use Embabel with Azure OpenAI, accessed through our internal GenAIHub gateway.
Azure OpenAI does not use the standard Authorization: Bearer header.
Instead, it expects an api-key header, or Ocp-Apim-Subscription-Key.
I noticed that OpenAiCompatibleModelFactory internally creates its own OpenAiApi instance using a standard Bearer-token authentication. Since methods like createOpenAiApi() and chatModelOf() are not overridable, there is currently no way to inject a custom header or a custom RestClient/WebClient.
It’s possible I may be misunderstanding something, but from what I can see, Embabel currently cannot adapt its OpenAI client to Azure’s authentication model.
Is there an existing mechanism to customize the OpenAiApi instance, or could this be made extensible so Azure OpenAI (and similar OpenAI-compatible gateways) can be supported?
Thanks for your help
Huong
Beta Was this translation helpful? Give feedback.
All reactions