From c82666fea3d370691974b254fdc3e0d3ab5bdb8d Mon Sep 17 00:00:00 2001 From: Yufan Song <33971064+yufansong@users.noreply.github.com> Date: Sat, 15 Jun 2024 08:04:43 +0800 Subject: [PATCH] chores: fix DelegatorAgent description (#2446) * change * change comments * fix --- agenthub/delegator_agent/agent.py | 7 +++---- agenthub/dummy_agent/agent.py | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/agenthub/delegator_agent/agent.py b/agenthub/delegator_agent/agent.py index a6870c54c2..2e44ff9e68 100644 --- a/agenthub/delegator_agent/agent.py +++ b/agenthub/delegator_agent/agent.py @@ -8,8 +8,7 @@ from opendevin.llm.llm import LLM class DelegatorAgent(Agent): VERSION = '1.0' """ - The planner agent utilizes a special prompting strategy to create long term plans for solving problems. - The agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step. + The Delegator Agent is responsible for delegating tasks to other agents based on the current task. """ current_delegate: str = '' @@ -26,14 +25,14 @@ class DelegatorAgent(Agent): def step(self, state: State) -> Action: """ Checks to see if current step is completed, returns AgentFinishAction if True. - Otherwise, creates a plan prompt and sends to model for inference, returning the result as the next action. + Otherwise, delegates the task to the next agent in the pipeline. Parameters: - state (State): The current state given the previous actions and observations Returns: - AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned' - - Action: The next action to take based on llm response + - AgentDelegateAction: The next agent to delegate the task to """ if self.current_delegate == '': self.current_delegate = 'study' diff --git a/agenthub/dummy_agent/agent.py b/agenthub/dummy_agent/agent.py index 1dc29aaded..4b3f78984c 100644 --- a/agenthub/dummy_agent/agent.py +++ b/agenthub/dummy_agent/agent.py @@ -31,7 +31,6 @@ from opendevin.llm.llm import LLM """ FIXME: There are a few problems this surfaced * FileWrites seem to add an unintended newline at the end of the file -* command_id is sometimes a number, sometimes a string * Why isn't the output of the background command split between two steps? * Browser not working """ @@ -100,12 +99,12 @@ class DummyAgent(Agent): 'observations': [ CmdOutputObservation( 'Background command started. To stop it, send a `kill` action with command_id 42', - command_id='42', # type: ignore[arg-type] + command_id=42, command=BACKGROUND_CMD, ), CmdOutputObservation( 'This is in the background\nThis too\n', - command_id='42', # type: ignore[arg-type] + command_id=42, command=BACKGROUND_CMD, ), ], @@ -114,7 +113,7 @@ class DummyAgent(Agent): 'action': AgentRecallAction(query='who am I?'), 'observations': [ AgentRecallObservation('', memories=['I am a computer.']), - # CmdOutputObservation('This too\n', command_id='42', command=BACKGROUND_CMD), + # CmdOutputObservation('This too\n', command_id=42, command=BACKGROUND_CMD), ], }, {