You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The default way to set httpClient header is openai-style Authorization: Bearer ...now. But comparing to official python-openai library the default way is Azure-style api_key ... (here is source)
There is only one option to influence api key header: ProviderType.
Describe the solution you'd like
To avoid breaking changes my idea is to introduce new option AuthorizationHeaderType with explicit default value Undefined. At OpenAIService constructor AuthorizationHeaderType may be checked and may be set depending on ProviderType value.
Is your feature request related to a problem? Please describe.
The default way to set httpClient header is openai-style
Authorization: Bearer ...
now. But comparing to official python-openai library the default way is Azure-styleapi_key ...
(here is source)There is only one option to influence api key header:
ProviderType
.Describe the solution you'd like
To avoid breaking changes my idea is to introduce new option
AuthorizationHeaderType
with explicit default valueUndefined
. AtOpenAIService
constructorAuthorizationHeaderType
may be checked and may be set depending onProviderType
value.Create enum:
Add new attribute to
class OpenAiOptions
:Replace lines
switch (settings.ProviderType) {...}
at OpenAIService constructor:Describe alternatives you've considered
AuthorizationHeaderType
attribute atOpenAiOptions
may be nullable.The text was updated successfully, but these errors were encountered: