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

Feature max tokens config #36

Merged
merged 4 commits into from Mar 15, 2024

Conversation

QAbot-zh
Copy link
Contributor

鉴于微信回复有长度限制,现通过环境变量 maxOutput 来限制模型的最大输出。部署时如果不添加该环境变量,则与原程序功能保持一致。

下图中为设置maxOutput=50的极端条件,实际使用可以放宽为 500~1000,1汉字≈2token。选取合适值可以既约束模型输出内容,又能减少拒绝回复率。如果仍然发生截断,可以提示模型“继续”回复:

image

@pwh-pwh pwh-pwh merged commit 85757b3 into pwh-pwh:master Mar 15, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants