Skip to content

Commit

Permalink
generate reply synchronously not async
Browse files Browse the repository at this point in the history
  • Loading branch information
Merlinvt committed Dec 16, 2024
1 parent 670c6c8 commit 0a02c48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autogen/agentchat/contrib/magentic_one/orchestrator_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,13 +523,13 @@ def _select_next_agent(self, task: dict | str) -> Optional[ConversableAgent]:

return None

async def a_generate_reply(
def generate_reply(
self,
messages: Optional[List[Dict[str, Any]]] = None,
sender: Optional["Agent"] = None,
**kwargs: Any,
) -> Union[str, Dict, None]:
"""Asynchronously generate a reply by orchestrating multi-agent task execution.
"""Generate a reply by orchestrating multi-agent task execution.
This method manages the entire lifecycle of a multi-agent task, including:
- Initializing the task
Expand Down Expand Up @@ -592,7 +592,7 @@ async def a_generate_reply(
)
break

response = await next_agent.a_generate_reply(messages=[instructions], sender=self)
response = next_agent.generate_reply(messages=[instructions], sender=self)

if isinstance(response, str):
response = response
Expand Down

0 comments on commit 0a02c48

Please sign in to comment.