coai icon indicating copy to clipboard operation
coai copied to clipboard

不支持 o1-preview

Open FlintyLemming opened this issue 1 year ago • 2 comments

  • [x] 我已确认目前没有类似 issue
  • [x] 我已确认我已升级到最新版本
  • [x] 我已完整浏览项目 README 和项目文档并未找到解决方案
  • [x] 我理解并愿意跟进此 issue,协助测试和提供反馈
  • [x] 我将以礼貌和尊重的态度提问,不得使用不文明用语 (包括在此发布评论的所有人同样适用, 不遵守的人将被 block)
  • [x] 如果为新供应商格式,我已确认此供应商有一定的用户群体和知名度,借此以广告和推广类的名义的中转站点请求将被直接关闭
  • [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

供应商名称

OpenAI o1-preview

描述

调用 o1 的 API 时报错

Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. (type: invalid_request_error)

参考 issue: https://github.com/janhq/jan/issues/3698

FlintyLemming avatar Oct 30 '24 08:10 FlintyLemming

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


Title: o1-preview is not supported

  • [x] I have confirmed that there is currently no similar issue
  • [x] I have confirmed that I have upgraded to the latest version
  • [x] I have fully browsed the project README and project documentation and did not find a solution
  • [x] I understand and am willing to follow up on this issue, assist in testing and provide feedback
  • [x] I will ask questions in a polite and respectful manner and shall not use uncivilized language (the same applies to everyone who posts comments here, those who do not comply will be blocked)
  • [x] If it is a new supplier format, I have confirmed that this supplier has a certain user group and popularity, so requests for transfer sites in the name of advertising and promotion will be closed directly
  • [x] I understand and agree with the above content, and understand that project maintainers have limited energy. Issues that do not follow the rules may be ignored or closed directly

Supplier name

OpenAI o1-preview

describe

An error occurs when calling the API of o1

Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. (type: invalid_request_error)

Reference issue: https://github.com/janhq/jan/issues/3698

Issues-translate-bot avatar Oct 30 '24 08:10 Issues-translate-bot

+1,o1 mini 也不能用

前端显示错误信息:Invalid 'max_completion_tokens': integer below minimum value. Expected a value >= 1, but got 0 instead. (type: invalid_request_error)

详细日志:

[DEBUG] - [2024-12-04 13:51:35] - [tiktoken] error encoding messages: no encoding for model o1-mini (model: o1-mini), using default model instead
[DEBUG] - [2024-12-04 13:51:35] - [tiktoken] num tokens from messages: 18 (tokens per message: 3, model: gpt-3.5-turbo-0613)
[DEBUG] - [2024-12-04 13:51:35] - [sse] event source: POST https://api.vveai.com/v1/chat/completions
headers: {"Authorization":"Bearer sk-3hjeBwrSPhXUX1RuC25718344a6041FeAaE2AfB8F61e4b53","Content-Type":"application/json"}
body: {"model":"o1-mini","messages":[{"role":"user","content":"你好"}],"max_tokens":2000,"stream":true,"presence_penalty":0,"frequency_penalty":0,"temperature":0.6,"top_p":1}
[DEBUG] - [2024-12-04 13:51:36] - [sse] request failed with status: 400 Bad Request
response: {"error":{"message":"Invalid 'max_completion_tokens': integer below minimum value. Expected a value \u003e= 1, but got 0 instead. (request id: 2024120413513629558589302506421) (request id: 2024120413513625503153063080363)","type":"invalid_request_error","param":"max_completion_tokens","code":"integer_below_min_value"}}
[WARNING] - [2024-12-04 13:51:36] - [channel] caught error Invalid 'max_completion_tokens': integer below minimum value. Expected a value >= 1, but got 0 instead.   (type: invalid_request_error) for model o1-mini at channel api-vveai-com
[INFO] - [2024-12-04 13:51:36] - [channel] channels are exhausted for model o1-mini
[WARNING] - [2024-12-04 13:51:36] - Invalid 'max_completion_tokens': integer below minimum value. Expected a value >= 1, but got 0 instead.   (type: invalid_request_error) (model: o1-mini, client: 182.99.59.210)

BruceLee569 avatar Dec 04 '24 05:12 BruceLee569

来自社区的回答:可以暂时使用一个第三方工具进行转换 image

XiaomaiTX avatar Dec 06 '24 06:12 XiaomaiTX

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


Answer from the community: You can temporarily use a third-party tool for conversion image

Issues-translate-bot avatar Dec 06 '24 06:12 Issues-translate-bot

来自社区的回答:可以暂时使用一个第三方工具进行转换 image

Thanks; this is working.

Har-Kuun avatar Dec 07 '24 06:12 Har-Kuun

#285 will fix

zmh-program avatar Dec 08 '24 04:12 zmh-program

fix 29422181094e36765ed8bf496bbc674e6cad4389

XiaomaiTX avatar Feb 09 '25 02:02 XiaomaiTX