NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

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

Open xiaolan66 opened this issue 2 years ago • 10 comments

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

  • [X] Docker
  • [ ] Vercel
  • [ ] Server

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

xiaolan66 avatar May 24 '24 15:05 xiaolan66

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


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

Issues-translate-bot avatar May 24 '24 15:05 Issues-translate-bot

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

Dean-YZG avatar May 27 '24 04:05 Dean-YZG

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

shansing avatar May 27 '24 11:05 shansing

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.

Issues-translate-bot avatar May 27 '24 11:05 Issues-translate-bot

我也遇到了这个问题!

sanbei101 avatar Jun 09 '24 04:06 sanbei101

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


I also encountered this problem!

Issues-translate-bot avatar Jun 09 '24 04:06 Issues-translate-bot

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

bequt avatar Jul 01 '24 09:07 bequt

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.

Issues-translate-bot avatar Jul 01 '24 09:07 Issues-translate-bot

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

chenggb123 avatar Jul 04 '24 00:07 chenggb123

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.

Issues-translate-bot avatar Jul 04 '24 00:07 Issues-translate-bot