Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
fix(openai): change max_tokens to max_completion_tokens in openai chat model (#2065)
qbced09b4cec476
diff --git a/src/agentscope/model/_openai_chat/_model.py b/src/agentscope/model/_openai_chat/_model.pyindex 76a1bdd37..d7885189f 100644--- a/src/agentscope/model/_openai_chat/_model.py+++ b/src/agentscope/model/_openai_chat/_model.py@@ -224,7 +224,7 @@ class OpenAIChatModel(ChatModelBase):}if self.parameters.max_tokens is not None:- kwargs["max_tokens"] = self.parameters.max_tokens+ kwargs["max_completion_tokens"] = self.parameters.max_tokensif self.parameters.temperature is not None:kwargs["temperature"] = self.parameters.temperature