SciSharp / BotSharp

The AI Agent Framework in .NET
https://botsharp.readthedocs.io
Apache License 2.0
1.99k stars 413 forks source link

Azure.RequestFailedException #386

Closed wilson-dixon closed 1 month ago

wilson-dixon commented 1 month ago

After your recent updates to the openAI provider and appsettings, I am getting the following error:

Azure.RequestFailedException: 'Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource. Status: 401 (PermissionDenied) ErrorCode: 401

Content: {"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}

Headers: apim-request-id: REDACTED Date: Tue, 02 Apr 2024 16:22:56 GMT Content-Length: 224 Content-Type: application/json '

I am using an API key from OpenAI and not from Azure

wilson-dixon commented 1 month ago

Realized that you are communicating using azure as provider rather than openai