ChatGPTNextWeb / ChatGPT-Next-Web

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

[Bug] 接入自定义模型 阿里的Qwen #4772

Closed xiaolan66 closed 4 months ago

xiaolan66 commented 4 months ago

Bug Description

这是错误代码

{
  "error": {
    "code": "invalid_parameter_error",
    "param": null,
    "message": "Range of top_p should be (0.0, 1.0)",
    "type": "invalid_request_error"
  }
}

问题就是这top_p参数的问题,程序默认的事整数1,而不是浮点数1.0

Steps to Reproduce

{ "error": { "code": "invalid_parameter_error", "param": null, "message": "Range of top_p should be (0.0, 1.0)", "type": "invalid_request_error" } }

Expected Behavior

{ "error": { "code": "invalid_parameter_error", "param": null, "message": "Range of top_p should be (0.0, 1.0)", "type": "invalid_request_error" } }

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

Issues-translate-bot commented 4 months ago

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


Title: [Bug] Access custom model Alibaba’s Qwen

Dean-YZG commented 4 months ago

Is there a screenshot of the interface request error in the browser console? As you know, integer type and float type is both number in javascript , the param type of 'top_p' is number in nextchat, so i guess the error was caused by something else, for example, (0.0, 1.0) is a open interval

shansing commented 4 months ago

我也遇到了。跟浮点不浮点没关系,你改成字符串(用引号包裹)会报不是浮点数。改成1.0也没用。似乎真是开区间。建议手动处理,大于等于1时变成0.999之类。

Issues-translate-bot commented 4 months ago

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


I encountered it too. It doesn't matter whether it is floating point or not. If you change it to a string (wrapped in quotes), it will report that it is not a floating point number. Changing it to 1.0 is useless. It seems to be really wide range. It is recommended to handle it manually. When it is greater than or equal to 1, it becomes 0.999 or something like that.

sanbei101 commented 3 months ago

我也遇到了这个问题!

Issues-translate-bot commented 3 months ago

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


I also encountered this problem!

bequt commented 3 months ago

我现在手动改成0.9是可以了,[是否未来考虑通过参数达到部署时进行配置。 目前阿里云免费开放这个模型,智商水平还是在线的。

Issues-translate-bot commented 3 months ago

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


I can now manually change it to 0.9. [Would you consider configuring parameters during deployment in the future? Alibaba Cloud is currently making this model available for free, and the IQ level is still online.

chenggb123 commented 3 months ago

确实,将top_p改为0.9可以正常使用,默认的1无法正常使用qwen模型,现在不知道如何修改默认的top_p

Issues-translate-bot commented 3 months ago

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


Indeed, changing top_p to 0.9 can be used normally. The default 1 cannot be used normally with the qwen model. Now I don’t know how to modify the default top_p.