ChatGPTNextWeb / ChatGPT-Next-Web

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

[Doc]文档似乎不是很清晰 #5007

Closed arloor closed 1 month ago

arloor commented 1 month ago

Bug Description

试图使用docker(podman)部署nextchatweb来使用azure openai api。看文档没找到正确的路子,最后发现要这么配置环境变量:

podman run -d \
--pull=newer \
--name chatweb \
-p 127.0.0.1:3000:3000 \
--replace \
--rm \
-e AZURE_URL=https://xxxxxxx.openai.azure.com/openai \
-e AZURE_API_KEY=xxxxxxx \
-e AZURE_API_VERSION=2024-06-01 \
-e CUSTOM_MODELS=-all,+gpt-4o@azure=gpt-4o \
-e HIDE_USER_API_KEY=1 \
docker.io/yidadaa/chatgpt-next-web

有几个坑:

  1. AZURE_URL不是 https://{azure-resource-url}/openai/deployments/{deploy-name},而是 https://{azure-resource-url}/openai
  2. 要设置 CUSTOM_MODELS,删除所有模型,仅手动增加azure的模型。否则页面会使用openai的模型而报错。关键在于我没有配置openai的相关东西,默认还走openai,应该默认走azure才合理。

另外我发现,总结对话的题目用的还是openai接口,我的日志里出现了访问openai超时的日志,并且无法生成对话标题。这应该也是默认行为不太合理的问题。

Steps to Reproduce

以如下命令部署:

podman run -d \
--pull=newer \
--name chatweb \
-p 127.0.0.1:3000:3000 \
--replace \
--rm \
-e AZURE_URL=https://xxxxxxx.openai.azure.com/openai \
-e AZURE_API_KEY=xxxxxxx \
-e AZURE_API_VERSION=2024-06-01 \
-e CUSTOM_MODELS=-all,+gpt-4o@azure=gpt-4o \
-e HIDE_USER_API_KEY=1 \
docker.io/yidadaa/chatgpt-next-web

Expected Behavior

期望修正文档,以及修改默认行为,避免使用未配置的openai接口

Screenshots

No response

Deployment Method

Desktop OS

No response

Desktop Browser

No response

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

nextchat-manager[bot] commented 1 month ago

Please follow the issue template to update title and description of your issue.

Issues-translate-bot commented 1 month ago

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


Title: [Doc]The documentation seems not very clear

Dowanw0w commented 1 month ago

I'm experiencing the same bug, if I use @azure to work with the model, I can't generate the title

lloydzhou commented 1 month ago

https://github.com/search?q=repo%3AChatGPTNextWeb%2FChatGPT-Next-Web+SUMMARIZE_MODEL&type=issues image

Issues-translate-bot commented 1 month ago

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


https://github.com/search?q=repo%3A ChatGPT NextWeb%2F ChatGPT-Next-Web+SUMMARIZE_MODEL type=issues image

Sha1rholder commented 1 month ago

不是文档写不清晰的问题,是目前有azure openai有bug,现在应该在修代码而不是文档

Issues-translate-bot commented 1 month ago

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


It’s not a problem that the documentation is unclear, it’s that there are bugs in Azure OpenAI, and now we should be fixing the code instead of the documentation.

lloydzhou commented 1 month ago

@Sha1rholder

不是文档写不清晰的问题,是目前有azure openai有bug,现在应该在修代码而不是文档

按前面的命令启动docker没有发现azure的问题。

有一个请求发到/api/openai,这个是总结的请求。当前系统只支持gpt-3.5-turbo@openai以及gemini-pro@google,这属于另一个问题。

如果你这边有其他的问题。可以提供一下具体的配置以及报错信息,方便排查。

Issues-translate-bot commented 1 month ago

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


The problem is not that the documentation is unclear, but that there are currently bugs in azure openai, and now we should be fixing the code instead of the documentation.

No problem with Azure was found when starting docker according to the previous command.

There is a request sent to /api/openai, this is the summary request. The current system only supports gpt-3.5-turbo@openai and gemini-pro@google, which is another problem.

If you have any other questions here. You can provide specific configuration and error information to facilitate troubleshooting.

arloor commented 1 month ago

@Sha1rholder

不是文档写不清晰的问题,是目前有azure openai有bug,现在应该在修代码而不是文档

按前面的命令启动docker没有发现azure的问题。

有一个请求发到/api/openai,这个是总结的请求。当前系统只支持gpt-3.5-turbo@openai以及gemini-pro@google,这属于另一个问题。

如果你这边有其他的问题。可以提供一下具体的配置以及报错信息,方便排查。

Can the summary request use azure openai in future versions?

masyaf90 commented 1 month ago

“AZURE_URL不是 https://{azure-resource-url}/openai/deployments/{deploy-name} ,而是 https://{azure-resource-url}/openai

按这一条AZURE_URL里删除“deployments/{deploy-name}”终于成功了, image AZURE_URL按文档填写https://{azure-resource-url}/openai/deployments/{deploy-name}或者https://{azure-resource-url}/openai/deployments/ 都会出现404 image

请尽快修改文档

Issues-translate-bot commented 1 month ago

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


"AZURE_URL is not https://{azure-resource-url}/openai/deployments/{deploy-name} but https://{azure-resource-url}/openai "

Clicking this AZURE_URL to delete "deployments/{deploy-name}" finally succeeded. image AZURE_URL fill in https://{azure-resource-url}/openai/deployments/{deploy-name} or https://{azure-resource-url}/openai/deployments/ according to the document 404 will appear image

Please modify the document as soon as possible

arloor commented 1 month ago

I can help to fix the document