Skip to content

feat: add Top-P parameter toggle with default enabled state and impro… #8137

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lihqi
Copy link

@lihqi lihqi commented Jul 14, 2025

本次 PR 的改动内容

提交信息feat: add Top-P parameter toggle with default enabled state and improved UI styling

在本次 PR 中:

  • 增加了对 Top-P 参数的开关配置,默认开启;
  • 优化了相关的 UI 样式。

变更前的行为

部分模型提供商(如 SenseCore 提供的 Qwen3-235B)在传入 top_p 参数后会报错,导致对话中断。

image

变更后的行为

新增了一个 Top-P 参数的开关,可以手动禁用该参数,确保在不兼容该参数的模型(如商汤)中也能继续正常对话。

为什么需要这样做 & 为什么以这种方式实现

我在使用过程中发现,不同模型对 top_p 参数的兼容性不同。例如:

  • Cloude 的模型即使传入了该参数,也能自动忽略并继续对话;
  • 商汤的 Qwen3-235B 模型则会因为传入该参数而直接报错,不能继续对话。

因此,我添加了参数控制开关,提升兼容性并保证用户对话不中断。

是否存在破坏性变更(Breaking changes)

无。

其他备注

这对我的使用帮助非常大,感谢项目的优秀设计,也希望这个改动能帮助更多用户。感谢 Review!

@lihqi
Copy link
Author

lihqi commented Jul 14, 2025

默认打开与原本的交互一致
image
image
关闭后
image
image

@EurFelux
Copy link
Contributor

EurFelux commented Jul 16, 2025

可以顺便给temperature也加上

这里一个数字单独占一行不太好看,改成和滑条一起占一行?
image

@lihqi
Copy link
Author

lihqi commented Jul 17, 2025

temperature也加上了
image
image

image image

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.

3 participants