NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Bug] v2.14.4 + 版本,Azure 配置 无法切换最新模型

Open mimoren opened this issue 2 years ago • 5 comments

📦 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 等,并且确认模型切换有效」

  1. 使用 docker-compose 启动 v2.14.4 「以上任意版本」的 next-chat,当前 latest 使用 (1) 中的.env 配置已无法正常使用,提示 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 提供的最新模型

希望我的描述准确,谢谢

mimoren avatar Nov 21 '24 08:11 mimoren

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


Title: [Bug]

Issues-translate-bot avatar Nov 21 '24 08:11 Issues-translate-bot

不能使用azure了,老版本还可以

Boytobeaman avatar Feb 22 '25 03:02 Boytobeaman

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


Can't use Azure, the old version is OK

Issues-translate-bot avatar Feb 22 '25 03:02 Issues-translate-bot

改用openai的接口,把api-key写在链接里,就能临时用了

pphunter avatar Mar 22 '25 07:03 pphunter

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


Use the openai interface instead, write the api-key in the link, and you can use it temporarily

Issues-translate-bot avatar Mar 22 '25 07:03 Issues-translate-bot