question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use Azure OpenAI service

See original GitHub issue

I tried to use Azure OpenAI with the new @microsoft/teams-ai, version 0.1.0-preview.2, and I had the following error on the completion request:

[onTurnError] unhandled error: AxiosError: Request failed with status code 401

To reproduce the problem, I change the OpenAIPlanner for the following AzureOpenAIPlanner:

const planner = new AzureOpenAIPlanner({
  apiKey: config.openAIKey,
  defaultModel: 'gpt-35-turbo',
  logRequests: true,
  endpoint: config.openAIEndpoint,
  apiVersion: '2023-03-15-preview'
});

Debugging the problem, the code requested the OpenAI endpoint not the Azure endpoint.

image

Maybe I missed a param to configure the planner to use Azure or the Azure Planner is not correctly configured to use the Azure OpenAI client.

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
tsubakimotocommented, Jun 18, 2023

@corinagum Thank you for your support. By commenting out moderator I was able to use AOAI.

1reaction
corinagumcommented, Jun 12, 2023

@tsubakimoto currently moderation is not fully implemented in AOAI and is in development. For me, not including moderation worked. Could you give that a try?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot connect to Azure Openai service deployment
I have created an Azure openai service and have also created a deployed model. This works well in the playground but I cannot...
Read more >
Onboarded user can't login to Azure AI
Your current directory doesn't have a subscription with an associated Azure OpenAI Service account. First, request access to Azure OpenAI ...
Read more >
Unable to log into Azure AI Studio after approved + ...
Hi, I was approved to create an Azure OpenAI resource. I created one within a new resource group in the Azure Portal.
Read more >
Azure OpenAI Service frequently asked questions
All Azure OpenAI customers can use Azure OpenAI on your data via the Azure AI studio and Rest API. What data sources does...
Read more >
I cant use Azure OpenAI in Language Studio please help
I tried to automatically create data using AzurreOpenAI in LanguageStudio's labeling data creation, but it is not displayed in the list even ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found