Skip to content

Commit

Permalink
Revert "remove send to agent. Already handled in oai_messages"
Browse files Browse the repository at this point in the history
This reverts commit eb5ac4c.
  • Loading branch information
merlin.von-trott committed Nov 25, 2024
1 parent df366c6 commit 8b56549
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autogen/agentchat/contrib/orchestrator_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ def _select_next_agent(self, task: str) -> Optional[ConversableAgent]:
synthesized_prompt = self._get_synthesize_prompt(
self._task, self._team_description, self._facts, self._plan
)

# Share new plan with all agents
for agent in self._agents:
self.send(synthesized_prompt, agent)

logger.info(
f"(thought) New plan:\n{synthesized_prompt}"
Expand All @@ -421,6 +425,8 @@ def _select_next_agent(self, task: str) -> Optional[ConversableAgent]:
# Update chat history
self._append_oai_message({"role": "assistant", "content": instruction}, "assistant", self, True)

# Send instruction directly to the agent
self.send(instruction, agent)
return agent

return None
Expand Down

0 comments on commit 8b56549

Please sign in to comment.