The chat reply content is too short
例行检查
- [x] 我已确认目前没有类似 issue
- [x] 我已完整查看过项目 README,以及项目文档
- [x] 我使用了自己的 key,并确认我的 key 是可正常使用的
- [x] 我理解并愿意跟进此 issue,协助测试和提供反馈
- [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭
你的版本
- [ ] 公有云版本
- [x] 私有部署版本
问题描述 我发现构建的聊天应用回复都很短,即使没有知识库没有其他多余的设置,增加回复上限到8000也是这样。我去搜索了一下,发现max_tokens很多人认为这是个糟糕的设置。是否因为这个原因导致回复很短呢?
复现步骤 使用相同的提示词,chatgpt-next-web、chatgpt-web的回复更长。
预期结果 fastgpt结果应该与chatgpt-next-web、chatgpt-web的回复长度一致。
相关截图
当然这里有些变量没控制,比如azure的gpt4-1106与openai的gpt4-1106,还有温度等参数。如果作者您需要更多的数据我可以提供。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Routine inspection
- [x] I have confirmed that there is no similar issue currently
- [x] I have fully reviewed the project README, as well as project documentation
- [x] I used my own key and confirmed that my key can be used normally
- [x] I understand and am willing to follow up on this issue, assist in testing and provide feedback
- [x] I understand and acknowledge the above content, and understand that project maintainers have limited energy. Issues that do not follow the rules may be ignored or closed directly
your version
- [ ] Public cloud version
- [x] Private deployment version
Problem Description I found that the replies of the chat application built were very short, even without knowledge base and other redundant settings, and this was the case when the reply limit was increased to 8000. I went searching and found max_tokens which many people think is a bad setting. Is this why the replies are so short?
Steps to reproduce Using the same prompt words, chatgpt-next-web and chatgpt-web have longer responses.
expected outcome The fastgpt result should be consistent with the reply length of chatgpt-next-web and chatgpt-web.
Related screenshots
Of course, there are some variables that are not controlled here, such as azure's gpt4-1106 and openai's gpt4-1106, as well as temperature and other parameters. If you, the author, need more data I can provide it.
nextweb 不是都内置提示词的么
我把内置提示词去掉了(因为azure模型的知识库日期有问题),所以应该只剩下自己的。另外chatgptweb回复也比fast长,所以我现在很好奇,是什么影响到了输出长度。我准备去你们代码那注释掉max_token,保证所有参数一致再看看
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I removed the built-in prompt words (because there was a problem with the knowledge base date of the Azure model), so I should only be left with my own. In addition, the chatgptweb reply is also longer than fast, so I am now curious about what affects the output length. I'm going to comment out max_token in your code and make sure all parameters are consistent and then take a look.
我把内置提示词去掉了(因为azure模型的知识库日期有问题),所以应该只剩下自己的。另外chatgptweb回复也比fast长,所以我现在很好奇,是什么影响到了输出长度。我准备去你们代码那注释掉max_token,保证所有参数一致再看看
我记得那个提示词去不掉的,去掉了就是走系统默认的。
而且我测试3.5 并没有发现有什么不同。
奇怪,难道我这哪有问题。我排查一下
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Strange, is there something wrong with me? Let me check
这里看不出来,我统计了下,fastgpt用gpt4给我返回了800-900字符,gpt3.5会好一些1000-1100,nextweb返回1400-1500。就很奇怪
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I can’t tell it here. I did some statistics and found that fastgpt returned 800-900 characters using gpt4, gpt3.5 would be better at 1000-1100, and nextweb returned 1400-1500. That's weird
所以最后应该如何解决。我也是觉得回复很短
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
So how should we solve it in the end. I also think the reply is very short.