ChatGPTNextWeb / ChatGPTNextWeb/NextChat
[Bug] v2.14.4 + 版本,Azure 配置 无法切换最新模型
- Dominant language
- TypeScript
- Stars
- 88.8k
- Forks
- 59.1k
- PR merge metrics
- No merged PRs in 30d
Description
### 📦 Deployment Method
docker-compose
### 📌 Version
2.12.4+
### 🐛 Bug Description
1. 使用 docker-compose 启动 v2.14.4 版本的 next-chat
.env 关键配置:
```
CODE="xxxxxx,xxxxxxx,xxxx"
AZURE_URL="https://xxxx.openai.azure.com/openai/deployments/xxx-gpt-4-8k"
# 注意上面 deployments 后的内容
AZURE_API_KEY="xxxxxxxxxxxxxx"
AZURE_API_VERSION="2023-03-xx-preview"
```
以上版本及配置可以正常运行,并且「可以在前端页面自由选择不同的 GPT 模型, 比如 gpt-4o-2024-05-13 等,并且确认模型切换有效」
2. 使用 docker-compose 启动 v2.14.4 「以上任意版本」的 next-chat,当前 latest
使用 (1) 中的.env 配置已无法正常使用,提示 [5687](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5687)相同的错误
```
{
"error": {
"message": "Incorrect API key provided: nk-****. You can find your API key at https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}
```
修改 .env 关键配置如下
```
CODE="xxxxxx,xxxxxxx,xxxx"
AZURE_URL="https://xxxx.openai.azure.com/openai"
# 注意 deployments 内容被移除
AZURE_API_KEY="xxxxxxxxxxxxxx"
AZURE_API_VERSION="2023-03-xx-preview"
# 相比(1)中新增的配置
CUSTOM_MODELS="+xxx-gpt-4-8k@Azure"
DEFAULT_MODEL="xxx-gpt-4-8k@Azure"
```
配置修改之后可正常打开 next-chat 并且与 gpt 对话,但是模型只能选择 xxx-gpt-4-8k@Azure,选择其他任何模型都会提示模型错误
```
{
"error": {
"code": "DeploymentNotFound",
"message": "The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."
}
}
```
虽然选择 xxx-gpt-4-8k@Azure 模型可以正常使用,但是相比 (1)我无法选择其他最新模型,而实际在(1)的版本和配置当中,我可以使用所有 Azure 提供的最新模型
希望我的描述准确,谢谢
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.