Skip to content

Conversation

@allenli178
Copy link
Contributor

@allenli178 allenli178 commented Sep 19, 2025

  • 将 enable_thinking 判空条件由简单布尔判断改为非 None 判断
  • 避免 enable_thinking 为 False 时跳过赋值的问题
  • 确保当 kwargs 中无 enable_thinking 时正确添加对应参数

AgentScope Version

[The version of AgentScope you are working on, e.g. import agentscope; print(agentscope.__version__)]

Description

[Please describe the background, purpose, changes made, and how to test this PR]

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with pre-commit run --all-files command
  • All tests are passing
  • Docstrings are in Google style
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

- 将 enable_thinking 判空条件由简单布尔判断改为非 None 判断
- 避免 enable_thinking 为 False 时跳过赋值的问题
- 确保当 kwargs 中无 enable_thinking 时正确添加对应参数
Copy link
Member

@qbc2016 qbc2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this bug. Please perform the following operations to complete the pre-commit verification:

pip install pre-commit 
pre-commit install
pre-commit run --all-files

- 将单行条件判断拆分成多行以提高可读性
- 保持逻辑不变,确保代码风格一致
- 修正缩进以符合项目代码规范
@DavdGao DavdGao added Bug Something doesn't work Ready for Review labels Sep 19, 2025
Copy link
Member

@DavdGao DavdGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and @qbc2016 please check if the same issue exist in the other chat model classes

@DavdGao DavdGao merged commit be7ffa4 into agentscope-ai:main Sep 19, 2025
15 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something doesn't work Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants