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.
Currently AzureOpenAIChatGenerator supports setting the default_headers to send in the Azure request, but AzureOpenAIDocumentEmbedder and AzureOpenAITextEmbedder do not. This breaks Azure set ups that require subscription keys, which will give you this error if you can't modify the headers and send the subscription key: openai.AuthenticationError: Error code: 401 - {'statusCode': 401, 'message': 'Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API.'}
Describe the solution you'd like
It should be very simple to add this default_headers parameter similarly to the Generator for Azure:
Is your feature request related to a problem? Please describe.
Currently
AzureOpenAIChatGenerator
supports setting thedefault_headers
to send in the Azure request, butAzureOpenAIDocumentEmbedder
andAzureOpenAITextEmbedder
do not. This breaks Azure set ups that require subscription keys, which will give you this error if you can't modify the headers and send the subscription key:openai.AuthenticationError: Error code: 401 - {'statusCode': 401, 'message': 'Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API.'}
Describe the solution you'd like
It should be very simple to add this
default_headers
parameter similarly to the Generator for Azure:haystack/haystack/components/generators/azure.py
Line 71 in 852900d
and
haystack/haystack/components/generators/azure.py
Line 152 in 852900d
Describe alternatives you've considered
Just skip using Haystack's Azure wrapper classes for embeddings
The text was updated successfully, but these errors were encountered: