Skip to content

Build and run agents you can see, understand and trust.

feat(dashscope): move `generate_kwargs` after default params to ensure user-defined values take precedence (#1304)

qbca9947da8cdc1
diff --git a/src/agentscope/model/_dashscope_model.py b/src/agentscope/model/_dashscope_model.py
index 284c714bc..cd727fc7f 100644
--- a/src/agentscope/model/_dashscope_model.py
+++ b/src/agentscope/model/_dashscope_model.py
@@ -214,12 +214,12 @@ class DashScopeChatModel(ChatModelBase):
"messages": messages,
"model": self.model_name,
"stream": self.stream,
- **self.generate_kwargs,
- **kwargs,
"result_format": "message",
# In agentscope, the `incremental_output` must be `True` when
# `self.stream` is True
"incremental_output": self.stream,
+ **self.generate_kwargs,
+ **kwargs,
}
if tools: