diff --git a/agency_swarm/threads/thread_async.py b/agency_swarm/threads/thread_async.py index 7580bfc0..9ce0cc24 100644 --- a/agency_swarm/threads/thread_async.py +++ b/agency_swarm/threads/thread_async.py @@ -19,7 +19,7 @@ def worker(self, message: str, message_files=None): try: next(gen) except StopIteration as e: - self.response = f"""{self.recipient_agent.name} Response: '{e.value}'""" + self.response = f"""{self.recipient_agent.name}'s Response: '{e.value}'""" break return @@ -63,7 +63,7 @@ def check_status(self, run=None): order="desc", ) - return f"""{self.recipient_agent.name} Response: '{messages.data[0].content[0].text.value}'""" + return f"""{self.recipient_agent.name}'s Response: '{messages.data[0].content[0].text.value}'""" def get_last_run(self): if not self.thread: diff --git a/tests/test_agency.py b/tests/test_agency.py index 79f55d45..4ff819e3 100644 --- a/tests/test_agency.py +++ b/tests/test_agency.py @@ -222,7 +222,7 @@ def test_7_async_agent_communication(self): time.sleep(10) - message = self.__class__.agency.get_completion("Please check status. If the agent responds, say 'success', if the agent does not respond, or if you get a system update say 'error'.", + message = self.__class__.agency.get_completion("Please check response. If the you get TestAgent1's response, say 'success', if the agent does not respond, or if you get a system notification instead say 'error'.", yield_messages=False) self.assertFalse('error' in message.lower())