[Bug] Azure OpenAI 无法使用
💻 系统环境
Rocky Linux release 9.1 (Blue Onyx)
📦 部署环境
Docker
🌐 浏览器
Chrome
🐛 问题描述
更新版本后, Azure OpenAI 无法使用,请问具体如何设置。https://chat-docs.lobehub.com/zh/self-hosting/examples/azure-openai 按照链接设置之前版本可以,现在不行了,截图里面的设置也没有了。
部署方式
安装此文档进行部署:https://chat-docs.lobehub.com/zh/self-hosting/platform/docker-compose
👀 @securitgithub
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
💻 System environment
Other Linux
📦 Deployment environment
Docker
🌐 Browser
Chrome
🐛 Problem description
After updating the version, Azure OpenAI cannot be used. Please tell me how to set it up. https://chat-docs.lobehub.com/zh/self-hosting/examples/azure-openai You can set the previous version according to the link, but it doesn’t work now, and the settings in the screenshot are gone.
🚦 Expected results
No response
📷 Steps to reproduce
No response
📝 Supplementary information
No response
你是配置的环境变量,还是在界面上填 api key 的?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Did you configure environment variables or fill in the api key on the interface?
你是配置的环境变量,还是在界面上填 api key 的?
dokcer 配置文件
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Did you configure environment variables or fill in the api key on the interface?
dokcer configuration file
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Did you configure environment variables or fill in the api key on the interface?
dokcer configuration file
之前都是正常的,跟配置文件应该没多大关系,curl测试也正常。
next chat上没问题。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
0.147.0 版本由于拆开来了 Azure 和 OpenAI 的配置,因此有些环境变量已经变了。针对 Azure OpenAI 的配置,需要从 OPENAI_PROXY_URL 改为 AZURE_ENDPOINT。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Version 0.147.0 has separated the configurations of Azure and OpenAI, so some environment variables have changed. For configuration of Azure OpenAI, you need to change from OPENAI_PROXY_URL to AZURE_ENDPOINT.
AZURE_ENDPOINT
这里怎么选择,选择不了Azure OpenAi模型。
按道理前端不需要在设置了
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
AZURE_ENDPOINT
How to choose here?
@securitgithub 更新下最新的镜像,我理解应该和 #1958 这个是同一个问题
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@securitgithub updated the latest image, I understand it should be the same problem as #1958
更新下最新的镜像,我理解应该和 #1958 这个是同一个问题
@arvinxx 开发者您好,我更新了最新的镜像,Azure处的模型依然默认为空。
是不是因为 src/app/api/config/route.ts 的 config 的 languageModel 没有设置azure模型的原因?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@securitgithub Update to the latest image, I understand it should be the same problem as #1958
Hello developers, I updated the latest image, and the Azure model is still empty by default.
Is it because the languageModel of the config in src/app/api/config/route.ts does not set the azure model?
@fooooxxxx 需要你自己在设置里添加 azure 模型了,因为之前实现的局限性,要求 id 和 deployment 同名,但是会有很多用户提 id 和部署名不一样的问题:
- #1952
- #1056
所以现在在这一版里支持了 id 和 deploymentName 分开设置。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@fooooxxxx You need to add the azure model in the settings yourself. Because of the limitations of the previous implementation, the id and deployment name are required to have the same name. However, many users will raise the issue that the id and deployment name are different:
- #1952
- #1056
So now in this version, separate setting of id and deploymentName is supported.
在最新的版本中 https://github.com/lobehub/lobe-chat/releases/tag/v0.147.6 Azure 仍然无法使用,在 Docker 环境变量中已经设置,但是仍然显示未开启 Azure 服务。
@missuo 哦,我傻了,这块忘记改了,一会修下
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@missuo Oh, I was stupid. I forgot to change this. I will fix it later.
✅ @securitgithub
This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。
:tada: This issue has been resolved in version 0.147.8 :tada:
The release is available on:
Your semantic-release bot :package::rocket: