NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

max token问题导致标题生成错误

Open jiangying000 opened this issue 1 year ago • 9 comments

有个必现的bug, 我如果把模型设置为:o1-mini max token 设置为 32768

image

压缩模型设置为 gpt-4o-mini

聊天2次,标题生成错误:{ "error": { "message": "max_tokens is too large: 32768. This model supports at most 16384 completion tokens, whereas you provided 32768. (request id: )", "type": "invalid_request_error", "param": "max_tokens", "code": null }}

image

Originally posted by @jiangying000 in https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5646#issuecomment-2408624801

jiangying000 avatar Oct 12 '24 16:10 jiangying000

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

nextchat-manager[bot] avatar Oct 12 '24 16:10 nextchat-manager[bot]

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


Title: max token problem causes title generation error

Issues-translate-bot avatar Oct 12 '24 16:10 Issues-translate-bot

也就是说本来设置max_token是为了用于o1-mini 结果gpt-4o-mini也报错了

Dogtiti avatar Oct 14 '24 14:10 Dogtiti

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


In other words, max_token was originally set to be used for gpt-4o-mini. As a result, o1-mini also reported an error.

Issues-translate-bot avatar Oct 14 '24 14:10 Issues-translate-bot

image @lloydzhou 这里由于gpt-4o-mini进入了这个判断导致带上了max_tokens 看看有没有好的办法来处理各个模型的参数问题

Dogtiti avatar Oct 14 '24 14:10 Dogtiti

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


image @lloydzhou Here, because gpt-4o-mini entered this judgment, max_tokens was brought in See if there is a good way to deal with the parameter issues of each model

Issues-translate-bot avatar Oct 14 '24 14:10 Issues-translate-bot

这里把max_token去掉可以吗?

lloydzhou avatar Oct 15 '24 04:10 lloydzhou

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


Can I remove max_token here?

Issues-translate-bot avatar Oct 15 '24 04:10 Issues-translate-bot

环境变量中max_token可以直接设置吗 默认4000太小了

q246 avatar Jul 23 '25 07:07 q246