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

请求超出最大的token #20

Open
wwjCMP opened this issue Mar 21, 2023 · 1 comment
Open

请求超出最大的token #20

wwjCMP opened this issue Mar 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@wwjCMP
Copy link

wwjCMP commented Mar 21, 2023

InvalidRequestError: This model's maximum context length is 4097 tokens. However, you requested 4431 tokens (3431 in the messages, 1000 in the completion). Please reduce the length of the messages or completion.

是记忆内相关内容太多了?还是什么原因,有什么方法避免?

@sean1832
Copy link
Owner

Hi, at the moment , you can either decrease Max Token or reduce Chunk Size to avoid such error message. If you choose to reduce Chunk Size, please ensure that you also update the brain accordingly.
I will implement a feature that instantly returns an error response if the total token count exceeds 4097, preventing users from calling the API and saving time by avoiding the wait for it to fail.

你好,目前的版本避免以上情况,你需要减小Max Token或者减少Chunk Size。如果你决定减小Chunk Size,请确保Update Brain。
我日后会增加一个功能,当总令牌数超过4097时立即反馈错误,防止浪费时间调用API,结果确是报错。
image

@sean1832 sean1832 added the bug Something isn't working label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants