-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
建议增加上下文长度限制 #1069
Comments
其实最应该支持的应该是 API 模式,accessToken模式本来就是灰色地带,官方来次重拳出击就没了,但是api 模式基本长期可以运行的。 |
能否增加max tokens配置项呢,最近经常遇到回复到一半就不说话了,让它继续就说不记得了,一看日志的请求max tokens是1000 |
max tokens不止这么多吧,你启用了最新的,在配置.env中打开长对话了吗 |
我用的是docker镜像,没看到文档说可以配置max tokens的环境变量,可以配置吗 |
是2.10.8的镜像 |
我把.env中打开长对话后重新打包运行,日志还是显示max tokens是1000,下面是完整日志
|
如果是3,提示的sendMessage (32 tokens)计数加上max_tokens(回答的长度,默认是1000)不能超过模型的上下文长度,2048个token。如果你经常需要>1000token的长回答,应该是使用4才有可能 4的话这个不是已经被merge了 |
好,十分感谢解答。说起来我之前看到GPT3.5的总限制是4096是吗(也就是代码中的maxModelTokens),这里设置1000是为了保障上下文记忆是吗,看到GPT4的32K和8K模型也是maxResponseTokens设为maxModelTokens的1/4 |
在文件
可以在每次打开网页时判断是否为New Chat,如果否则打开一个新的聊天,这是变相限制的方法 |
现在上下文会一直增加,除非手动清空。建议增加参数设置对话轮数自动清理,或者在ui上增加按钮设置轮数。
The text was updated successfully, but these errors were encountered: