X-Azure-Api-Key
doesn't work in headers. Asking openai api key instead. while calling withNearText search.
#4649
Labels
How to reproduce this bug?
I am using azure openai, i created class and client .
const client = weaviate.client({ scheme: 'https', host: 'XXXXX-vv0royyl.weaviate.network', headers: { "X-Azure-Api-Key": PROCESS.ENV.AZURE_OPENAI_KEY } });
I get below error while calling Below function
Function:
result = await client.graphql .get() .withClassName(model) .withNearText({ concepts: [question], targetVectors: ['content'], }) .withWhere({ path: ['trainingDataType'], operator: 'Equal', valueText: trainingDataType, }) .withLimit(limit) .withFields('content _additional { distance }') .do();
Error
{ "response": { "data": { "Get": { "Custcity": null } }, "errors": [ { "locations": [ { "column": 6, "line": 1 } ], "message": "explorer: get class: vectorize params: vectorize params: vectorize params: vectorize keywords: remote client vectorize: API Key: no api key found neither in request header: X-Openai-Api-Key nor in environment variable under OPENAI_APIKEY", "path": [ "Get", "Custcity" ] } ], "status": 200, "headers": {} }, "request": { "query": "{Get{Custcity(where:{operator:Equal,valueText:\"SCHEMA\",path:[\"trainingDataType\"]},nearText:{concepts:[\"Analyze the correlation between the number of activities (tasks and events) and opportunity win rates.\"],targetVectors:[\"content\"]},limit:8){content _additional { distance }}}}" } }
What is the expected behavior?
It should consider azure open ai key
What is the actual behavior?
It is not working with azure openai key
Slack conversation about issue: https://weaviate.slack.com/archives/C02RRQP23K3/p1712830332189929
Supporting information
No response
Server Version
1.24.8
Code of Conduct
The text was updated successfully, but these errors were encountered: