Browse Source

chores: fix DelegatorAgent description (#2446)

* change

* change comments

* fix
Yufan Song 1 year ago
parent
commit
c82666fea3
2 changed files with 6 additions and 8 deletions
  1. 3 4
      agenthub/delegator_agent/agent.py
  2. 3 4
      agenthub/dummy_agent/agent.py

+ 3 - 4
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'

+ 3 - 4
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),
                 ],
             },
             {