Skip to content

Commit

Permalink
Set tool config properly in send message
Browse files Browse the repository at this point in the history
  • Loading branch information
VRSEN committed Aug 18, 2024
1 parent f105222 commit ff03d38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agency_swarm/agency/agency.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ff03d38

Please sign in to comment.