Additional headers are not being sent to the Azure OpenAI
Hi, I am using the Python SDK to connect to Weaviate. Additionally, I am create collection that is able to send requests to Azure OpenAI, using text2vec-azure-openai module. To use that, I am sending X-Azure-Api-Key as it is mentioned in the documentation here: https://weaviate.io/developers/weaviate/model-providers/openai/embeddings.
The embedding of the texts through Azure OpenAI is working correctly. However, I want to include some additional headers that are passed directly to Azure OpenAI calls. I tried the following:
self._client = WeaviateClient(
connection_params=ConnectionParams(
http=ProtocolParams(host=host, port=port, secure=False),
grpc=ProtocolParams(host=host, port=grpc_port, secure=False),
),
additional_headers={
"X-Azure-Api-Key": ...,
"some_additional_custom_header": "value",
},
skip_init_checks=True,
)
self._client.connect()
Sadly, this option is not working and my additional headers are not sent to Azure OpenAI. Do I miss something or maybe it is not possible to pass some custom headers to Azure OpenAI through Weaviate? Thanks in advance for the response.