Open oswandor opened 3 weeks ago
FYI, GitHub reports that you revealed your search key in this issue. Make sure you rotate tha now. Also, part of your key is in the screenshot for GPT, better to blank that out.
As for the error: how did you provision that GPT model? Did you provision it in the Portal or via our infrastructure (azd up)? If you used azd up
, then you won't be able to use keys with it, since it's disabled:
https://github.com/Azure-Samples/aisearch-openai-rag-audio/security/secret-scanning/1
If you provisioned it yourself, then you'll need to check the Azure OpenAI resource in the Portal to see if key access is allowed. For example, this is what I see:
Assuming that key access is allowed, then your setup looks reasonable. I'd suggest adding more logging in the code that setups the credential to ensure it's using AzureKeyCredential with your key.
instead of wss: use https:
Minimal steps to reproduce
.env
file:Any log messages given by the failure
Error logs:
Expected/desired behavior
The WebSocket connection to the Azure OpenAI endpoint should establish successfully without any authentication errors.
OS and Version
Operating System: Windows 10 / 11 (please specify)
Additional Context / Help Needed
I keep receiving a
401 Unauthorized
error when trying to establish the WebSocket connection, which seems to be related to authentication. I am using the recommended values in the.env
file, but I still can't connect successfully. Could someone help identify the possible causes or suggest a solution for this error?attached is the image of the screenshot from where I'm getting the information from the .env file
this information I am adding these doing something wrong ? thank you, I am waiting for your help.