ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
76.92k stars 59.33k forks source link

[FAQ] 如何使用自定义模型(CUSTOM_MODELS)配置使用Azure资源 #5755

Open kehuantiantang opened 3 weeks ago

kehuantiantang commented 3 weeks ago

📦 部署方式

官方安装包

📌 软件版本

2.15.6

💻 系统环境

macOS

📌 系统版本

12.6.3

🌐 浏览器

Other

📌 浏览器版本

0

🐛 问题描述

您好,非常谢谢您的工作。 我更换api接口的时候,出现了"message": "empty response from server"的问题。

📷 复现步骤

修改前可用的api接口设置为:

  1. 服务商:azure
  2. 接口: https://xxx.openai.azure.com/openai/deployments/gpt4o
  3. 接口版本: 2023-03-15-preview
  4. 自定义模型:gpt4o
  5. 选择模型:gpt4o。

使用curl测试成功api接口:

curl https://kehua-m2ymeoeu-eastus2.openai.azure.com/openai/deployments/gpt4o/chat/completions?api-version=2024-08-01-preview \
  -H "Content-Type: application/json" \
  -H "api-key: xxxxx" \
  -d '{"messages":[{"role": "system", "content": "你是谁?"}]}'

根据接口,按照上面方法在2.15.6版本进行设置,依次为

  1. 服务商: azure
  2. 接口:https://kehua-m2ymeoeu-eastus2.openai.azure.com/openai/deployments/gpt4o
  3. 接口版本:2024-08-01-preview
  4. 自定义模型:gpt4o
  5. 选择模型:gpt4o 运行结果为:
    {
    "error": true,
    "message": "empty response from server"
    }

    image

我测试了非常多的方法,依旧无法顺利进行chat,请问应该如何设置? 是否有debug模式,可以看到发送的url地址,谢谢。

🚦 期望结果

📝 补充信息

Issues-translate-bot commented 3 weeks ago

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


Title: [Bug] macos, dmg client updated to 2.15.6, azure interface cannot be used

Dogtiti commented 3 weeks ago

5001

Issues-translate-bot commented 3 weeks ago

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


5001

eugene2candy commented 3 weeks ago

把接口改成 https://kehua-m2ymeoeu-eastus2.openai.azure.com/openai

Issues-translate-bot commented 3 weeks ago

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


Change the interface to https://kehua-m2ymeoeu-eastus2.openai.azure.com/openai

kehuantiantang commented 3 weeks ago

把接口改成 https://kehua-m2ymeoeu-eastus2.openai.azure.com/openai

Hello, thank you for your suggestion. I change the interface as your said, but it report another error. The configuration of NextChat:

  1. Interface: https://kehua-m2ymeoeu-eastus2.openai.azure.com/openai
  2. key: from azure
  3. azure api version: 2024-08-01-preview
  4. custom model: gpt4o image

The error report:

{
  "error": true,
  "message": "empty response from server"
}
eugene2candy commented 3 weeks ago

Your configuration is false by current code logic. Please follow my steps below:

  1. keep your endpoint as ending with "/openai"
  2. make sure your deployment name as gpt-4o image
  3. from the setting, leave the custom models as blank, setup model as gpt-4o(azure), summary model as gpt-4o(azure) image
kehuantiantang commented 3 weeks ago

Your configuration is false by current code logic. Please follow my steps below: 0. keep your endpoint as ending with "/openai"

  1. make sure your deployment name as gpt-4o image
  2. from the setting, leave the custom models as blank, setup model as gpt-4o(azure), summary model as gpt-4o(azure) image

Thank you so much for your advice, the interface finally work. I wonder to known that it is possible use different interface at some time. For example, I configure gpt4-o--> 2024-08-01-preview and gpt-35-turbo --> 0301. How can i modify the configuration(azure api version,custom model) for different model ? Thank you so much.

eugene2candy commented 2 weeks ago

Your configuration is false by current code logic. Please follow my steps below: 0. keep your endpoint as ending with "/openai"

  1. make sure your deployment name as gpt-4o image
  2. from the setting, leave the custom models as blank, setup model as gpt-4o(azure), summary model as gpt-4o(azure) image

Thank you so much for your advice, the interface finally work. I wonder to known that it is possible use different interface at some time. For example, I configure gpt4-o--> 2024-08-01-preview and gpt-35-turbo --> 0301. How can i modify the configuration(azure api version,custom model) for different model ? Thank you so much.

I don't actually contribute to this project. But I leveraged this project and modified the code a bit for my personal usage. So from my perspective, you are unable to specify different configurations for different models at the same time. If you still want to do so, you may need to download the source code and modify it by yourself.