Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure OpenAI, can't make it work, error 401 #169

Open
stevenbaert opened this issue Oct 6, 2023 · 0 comments
Open

Azure OpenAI, can't make it work, error 401 #169

stevenbaert opened this issue Oct 6, 2023 · 0 comments

Comments

@stevenbaert
Copy link

Hi,

I can make OpenAI work, but not Azure OpenAI. I got error below. It seems as if it's using Open AI whereas I want it to use Azure OpenAI.

I'm sure environment variables are correct because I use them in other Github Projects, these are my variables:

OPENAI_API_TYPE=azure
AZURE_OPENAI_KEY=1234456
OPENAI_API_HOST=https://myinstance.openai.azure.com
AZURE_DEPLOYMENT_ID_EMBEDDINGS=text-embedding-ada-002
OPENAI_API_VERSION=2023-03-15-preview

The error
OpenAIError: 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.
at OpenAIStream (webpack-internal:///(api)/./utils/server/index.ts:84:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async handler (webpack-internal:///(api)/./pages/api/chat.ts:74:24) {
type: undefined,
param: undefined,
code: '401'

Thanks for your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant