My Teams bot cannot access the OpenAI API, Error 401/404 - I tried several alternatives without success
Basically I deployed a ChatGPT 3.5 Turbo as well as created an index for my data, all using AI Studio. I downloaded the code that is generated for Teams and followed the README steps in the documentation using the Teams Toolkit in VS Code.
The only modification I needed to make to the code was to change the embedding_dependency authentication method, as the original couldnt run locally. After carrying out the provisioning and deploying steps, bot was deployed in Azure along with its related resources. As instructed in the README, I changed the Managed Identity permission linked to the chatbot webapp by assigning the Cognitive Service OpenAI User. After all the steps followed, it is not possible to contact the bot via the webapp, in Test in Webchat, or in Teams.
In the Log Stream, when trying to contact the bot through Teams, the message returned is the following:
SCM_LOGSTREAM_TIMEOUT (in seconds).[35;1mCHAT PROMPT:[0m[{"role": "system","content": "# Note\n// To update the model instructions directing how your custom copilot should behave when generating a response, \n// please update the role_information parameter located in the src\\prompts\\chat\\config.json file.\n// The skprompt.txt file is not used by Azure OpenAI On Your Data.\n"},{"role": "user","content": "hi"}][31;1mRequest failed with status code 400[0m
In the logs from App Insight it's possible to see that the webapp is getting Error 404 by calling GET to the API
The dependencies shows the following error
This error is presented under several hypotheses that I have already tested, between em: changing the search service authentication method to APIKey in the prompt\config and not Managed identity; assign permission for Cognitive OpenAI Service Contributor to Managed Identity; they all return the same error. I hope I can find an alternative so I can make this work.