Skip to content

Commit

Permalink
Fix attachments initialization with message files
Browse files Browse the repository at this point in the history
  • Loading branch information
VRSEN committed May 9, 2024
1 parent 9753de7 commit 9945078
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion agency_swarm/agency/agency.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def on_run_step_done(self, run_step: RunStep) -> None:
@override
@classmethod
def on_all_streams_end(cls):
self.message_output = None
cls.message_output = None
chatbot_queue.put("[end]")

def bot(original_message, history):
Expand Down
4 changes: 3 additions & 1 deletion agency_swarm/threads/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ def get_completion(self,
if not recipient_agent:
recipient_agent = self.recipient_agent

if not attachments:
attachments = []

if message_files:
recipient_tools = []
attachments = []

if FileSearch in recipient_agent.tools:
recipient_tools.append({"type": "file_search"})
Expand Down

0 comments on commit 9945078

Please sign in to comment.