Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] #4315

Closed
hbsky2015 opened this issue Oct 11, 2024 · 7 comments
Closed

[Bug] #4315

hbsky2015 opened this issue Oct 11, 2024 · 7 comments
Labels
azure 🐛 Bug Something isn't working | 缺陷

Comments

@hbsky2015
Copy link

📦 部署环境

Docker

📌 软件版本

v1.21.9

💻 系统环境

macOS

🌐 浏览器

Chrome

🐛 问题描述

Azure O1模型参数错误.max_tokens 参数已经改成了max_completion_tokens参数,请修复
{
"error": {
"message": "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.",
"type": "invalid_request_error",
"param": "max_tokens",
"code": "unsupported_parameter"
},
"endpoint": "https://jc-gpt-swedencentral-inside-1.openai.azure.com",
"provider": "azure"
}

📷 复现步骤

image

🚦 期望结果

O1模型的 max_tokens改成了max_completion_tokens参数

📝 补充信息

No response

@hbsky2015 hbsky2015 added the 🐛 Bug Something isn't working | 缺陷 label Oct 11, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Oct 11, 2024
@lobehubbot
Copy link
Member

👀 @hbsky2015

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Oct 11, 2024

@hbsky2015 你好! 我是Dosu,一个可以帮助你解决bug,回答问题,并成为贡献者的机器人。在等待人类维护者的过程中,我会尽力帮助你。祝你有愉快的一天!🤖

A similar issue has been reported where the max_tokens parameter is not supported by Azure OpenAI O1 models. The solution is to replace max_tokens with max_completion_tokens in the request construction. This change should be made in the part of the code where the request parameters are set, specifically in the LobeAzureOpenAI class or wherever the request payload is being constructed [1].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the azure label Oct 11, 2024
@hbsky2015
Copy link
Author

修复好了吗

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Has it been repaired?

@arvinxx
Copy link
Contributor

arvinxx commented Nov 9, 2024

重复 #4248

@arvinxx arvinxx closed this as completed Nov 9, 2024
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Nov 9, 2024
@lobehubbot
Copy link
Member

@hbsky2015

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Duplicate #4248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure 🐛 Bug Something isn't working | 缺陷
Projects
Archived in project
Development

No branches or pull requests

3 participants