feat: add Top-P parameter toggle with default enabled state and impro… #8137
+256
−157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
本次 PR 的改动内容
提交信息:
feat: add Top-P parameter toggle with default enabled state and improved UI styling
在本次 PR 中:
变更前的行为
部分模型提供商(如 SenseCore 提供的 Qwen3-235B)在传入
top_p
参数后会报错,导致对话中断。变更后的行为
新增了一个 Top-P 参数的开关,可以手动禁用该参数,确保在不兼容该参数的模型(如商汤)中也能继续正常对话。
为什么需要这样做 & 为什么以这种方式实现
我在使用过程中发现,不同模型对
top_p
参数的兼容性不同。例如:因此,我添加了参数控制开关,提升兼容性并保证用户对话不中断。
是否存在破坏性变更(Breaking changes)
无。
其他备注
这对我的使用帮助非常大,感谢项目的优秀设计,也希望这个改动能帮助更多用户。感谢 Review!