Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
[HOTFIX] Fix the error of the `enable_thinking` argument in `DashScopeChatModel` class (#796)
YuYanbe7ffa4203e8
diff --git a/src/agentscope/model/_dashscope_model.py b/src/agentscope/model/_dashscope_model.pyindex 89c05bdc8..e697fa6d1 100644--- a/src/agentscope/model/_dashscope_model.py+++ b/src/agentscope/model/_dashscope_model.py@@ -176,7 +176,10 @@ class DashScopeChatModel(ChatModelBase):self._validate_tool_choice(tool_choice, tools)kwargs["tool_choice"] = self._format_tool_choice(tool_choice)- if self.enable_thinking and "enable_thinking" not in kwargs:+ if (+ self.enable_thinking is not None+ and "enable_thinking" not in kwargs+ ):kwargs["enable_thinking"] = self.enable_thinkingif structured_model: