microsoft / azurechat

🤖 💼 Azure Chat Solution Accelerator powered by Azure Open AI Service
MIT License
1.15k stars 958 forks source link

Web-App Error "failed to fetch the chat response - try again" #255

Closed cray74 closed 7 months ago

cray74 commented 7 months ago

deployed on Azure; interface comes up, I can start a new chat, when submitting a question I always get "failed to fetch chat response - try again."

Interestingly, the AppServiceConsoleLogs shows an error:

message: 'Incorrect API key provided: 51c07208****7b4a. You can find your API key at https://platform.openai.com/account/api-keys.',

On a side note: the "update"-button on the left navigation bar shows a blinking red light; apparently the file (and directory) /home/site/wwwroot/app/update/update.md is missing:

[Error: ENOENT: no such file or directory, open '/home/site/wwwroot/app/update/update.md'] {

As said, deployed on Azure following instructions, no errors during deployment.

Any help is much appreciated!

schraepf commented 7 months ago

You may need to update your env.local file to rename AZURE_OPENAI_API_KEY to OPENAI_API_KEY. This solved for me.

cray74 commented 7 months ago

You may need to update your env.local file to rename AZURE_OPENAI_API_KEY to OPENAI_API_KEY. This solved for me.

actually, it was the other way round - the environment only had the OPENAI_API_KEY set and was looking for the AZURE_OPENAI_API_KEY.

Thanks a lot for your help!