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

[Bug] 使用环境变量配置的 Azure 服务鉴权异常 #198

Closed
Hk-Gosuto opened this issue Feb 19, 2024 · 8 comments · Fixed by #199
Closed

[Bug] 使用环境变量配置的 Azure 服务鉴权异常 #198

Hk-Gosuto opened this issue Feb 19, 2024 · 8 comments · Fixed by #199
Labels
bug Something isn't working

Comments

@Hk-Gosuto
Copy link
Owner

#197

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] Azure service authentication exception configured using environment variables

#197

@yuchanns
Copy link

If I don't use any environment and only configure it through the interface, it also won't work.

@Hk-Gosuto Hk-Gosuto added the bug Something isn't working label Feb 20, 2024
Hk-Gosuto added a commit that referenced this issue Feb 20, 2024
@Hk-Gosuto
Copy link
Owner Author

使用以下环境变量配置,自定义模型名使用 Azure 部署名:

AZURE_URL=https://xxxx.openai.azure.com/openai/deployments
AZURE_API_KEY=xxxxxxxxxxxxxxx
AZURE_API_VERSION=2024-02-15-preview

页面上配置参考上面的环境变量配置也可以正常使用。

Hk-Gosuto added a commit that referenced this issue Feb 20, 2024
@yuchanns
Copy link

yuchanns commented Feb 20, 2024

This issue persists.

The issue with using only environment variables for configuration has been resolved.

However, the same error will occur when configuring solely through the interface without using any environment variables. Just so you know, this situation arises only when environment variables and interface configurations are not used together.

In comparison, there is no problem if they are used in conjunction.

IMO this is caused by the different ways to read the key for the token in two scenes.

Please reopen it @Hk-Gosuto

@Hk-Gosuto
Copy link
Owner Author

This issue persists.

The issue with using only environment variables for configuration has been resolved.

However, the same error will occur when configuring solely through the interface without using any environment variables. Just so you know, this situation arises only when environment variables and interface configurations are not used together.

In comparison, there is no problem if they are used in conjunction.

IMO this is caused by the different ways to read the key for the token in two scenes.

Please reopen it @Hk-Gosuto

Are you referring to this error?

{"error":true,"msg":"empty access code"}

@yuchanns
Copy link

image

image

No, just the same error {"error":"OpenAI or Azure OpenAI API key not found"}

@Hk-Gosuto Hk-Gosuto reopened this Feb 20, 2024
@Hk-Gosuto
Copy link
Owner Author

Try the latest code.

@yuchanns
Copy link

Works now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants