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

[Request] 很想要能够自定义模型token的功能 #1517

Closed
jackfong66 opened this issue Mar 9, 2024 · 9 comments · Fixed by #1916
Closed

[Request] 很想要能够自定义模型token的功能 #1517

jackfong66 opened this issue Mar 9, 2024 · 9 comments · Fixed by #1916
Labels
🌠 Feature Request New feature or request | 特性与建议 released
Milestone

Comments

@jackfong66
Copy link

🥰 需求描述

QQ截图20240309212700
如图,模型是否支持图片,最大token是多少。现在似乎是没有办法设置的。

这样可能会导致聊天内容过长了 不会自动切成token大小发送到openai服务器。 导致返回错误。

🧐 解决方案

比如通过CUSTOM_MODELS来设置,或者弄一个配置文件。

📝 补充信息

No response

@jackfong66 jackfong66 added the 🌠 Feature Request New feature or request | 特性与建议 label Mar 9, 2024
@lobehubbot
Copy link
Member

👀 @jackfong66

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

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


🥰 Description of requirements

QQ screenshot 20240309212700
As shown in the figure, whether the model supports images and what is the maximum token. There seems to be no way to set it up now.

This may cause the chat content to be too long and not automatically cut into token size and sent to the openai server. Causes an error to be returned.

🧐 Solution

For example, set it through CUSTOM_MODELS, or create a configuration file.

📝 Supplementary information

No response

@arvinxx
Copy link
Contributor

arvinxx commented Mar 9, 2024

没看懂啥意思,能再解释下吗

@lobehubbot
Copy link
Member

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


I don’t understand what it means. Can you explain it further?

@jackfong66
Copy link
Author

没看懂啥意思,能再解释下吗

自定义模型配置成这样
CUSTOM_MODELS=-all,gpt-3.5-turbo,gpt-4,gpt-3.5-turbo-1106,gpt-3.5-turbo-16k,gpt-4-1106-preview,gpt-4-32k,gpt-4-vision-preview

会自动识别到gpt-3.5-turbo 最大token 16K 并显示出来了,实际上只有4K ,这个token数量没地方配置。而且我这个gpt-3.5-turbo也支持识别图片,但是默认也不给上传图片

@arvinxx
Copy link
Contributor

arvinxx commented Mar 9, 2024

之前有类似的需求: #1244 (comment)

后续有计划增强这个语法

@lobehubbot
Copy link
Member

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


There was a similar requirement before: #1244 (comment)

There are plans to enhance this syntax in the future

@arvinxx arvinxx added this to the LobeChat 1.0 milestone Apr 3, 2024
@lobehubbot
Copy link
Member

@jackfong66

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

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 0.147.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议 released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants