From ff03d389ccd5a30d27f4e245e12d53f7d2bb01d7 Mon Sep 17 00:00:00 2001 From: Arsenii Shatokhin Date: Sun, 18 Aug 2024 07:58:22 +0400 Subject: [PATCH] Set tool config properly in send message --- agency_swarm/agency/agency.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agency_swarm/agency/agency.py b/agency_swarm/agency/agency.py index cd5ce40e..58d701a7 100644 --- a/agency_swarm/agency/agency.py +++ b/agency_swarm/agency/agency.py @@ -1055,6 +1055,10 @@ class SendMessage(BaseTool): examples=["file-1234", "file-5678"]) additional_instructions: str = Field(default=None, description="Any additional instructions or clarifications that you would like to provide to the recipient agent.") + + class ToolConfig: + strict = False + one_call_at_a_time = outer_self.async_mode != 'threading' @model_validator(mode='after') def validate_files(self): @@ -1089,10 +1093,8 @@ def run(self): SendMessage._caller_agent = agent if self.async_mode == 'threading': SendMessage.__doc__ = self.send_message_tool_description_async - SendMessage.ToolConfig.one_call_at_a_time = False else: SendMessage.__doc__ = self.send_message_tool_description - SendMessage.ToolConfig.one_call_at_a_time = True return SendMessage