ChatGPTNextWeb / ChatGPT-Next-Web

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

[Bug] Azure api 配置不生效 #4796

Open wilber-F opened 4 months ago

wilber-F commented 4 months ago

Bug Description

使用了通用配置https://XXXX/openai/deployments/{deploy-name}不生效。不会自动替换{deploy-name}字段。请帮忙看看是什么地方配置错误。 docker run -d -p 4000:3000 -e "AZURE_URL=https://XXXXX.openai.azure.com/openai/deployments/{deploy-name}" -e AZURE_API_KEY=XXXXX -e AZURE_API_VERSION=2024-02-15-preview -e AZURE_OPENAI_MODEL_MAPPER="gpt-3.5-turbo=gpt-35-turbo" -e CUSTOM_MODELS=-all,+gpt-4o,+gpt-35-turbo yidadaa/chatgpt-next-web

Steps to Reproduce

更新了app到最新版,将部署名改成和模型名字一致,也加入过AZURE_OPENAI_MODEL_MAPPER,都无法生效。

Expected Behavior

请帮忙查看问题所在,谢谢

Screenshots

24f1c1d9ac688dd1f521df2d4341e4d image image

Deployment Method

Desktop OS

window11

Desktop Browser

chrome

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

Issues-translate-bot commented 4 months ago

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


Title: [Bug] Azure api configuration does not take effect

EdiWang commented 4 months ago

Have you tried specifying the deployment name with a fixed value instead of {deploy-name} in your AZURE_URL?

e.g.

https://****.openai.azure.com/openai/deployments/gpt-4o

Then for CUSTOM_MODELS, set value to -all,+gpt-4o

wilber-F commented 4 months ago

使用固定值的AZURE_URL是可以正常使用的,只有使用{deploy-name} 的方式会报错

Issues-translate-bot commented 4 months ago

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


Using a fixed value of AZURE_URL can be used normally. Only using {deploy-name} will report an error.

Mmahaha commented 2 months ago

目前支持AZURE_OPENAI_MODEL_MAPPER这个参数吗,我看只是有人提了个PR

Issues-translate-bot commented 2 months ago

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


Is the parameter AZURE_OPENAI_MODEL_MAPPER currently supported? I think someone just mentioned a PR.

lloydzhou commented 2 months ago

可以参考这个pr #4930 的实现:

  1. 从数据结构上支持一个模型由多个服务商提供
  2. 没有添加新配置,而是使用display_name当作deployment_name使用(这个设定应该算合理)
Issues-translate-bot commented 2 months ago

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


You can refer to the implementation of this PR #4930:

  1. Support one model provided by multiple service providers from the data structure
  2. No new configuration is added, but display_name is used as deployment_name (this setting should be reasonable)
lloydzhou commented 2 months ago

@wilber-F

前面提到的pr已经合并,不知道你这边的问题是否已经得到解决? image

Issues-translate-bot commented 2 months ago

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


@wilber-F

The PR mentioned earlier has been merged. I wonder if the problem on your side has been resolved? image