-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
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:
| default_headers: Optional[Dict[str, str]] = None, |
and
| default_headers=self.default_headers, |
Describe alternatives you've considered
Just skip using Haystack's Azure wrapper classes for embeddings