Skip to content

Commit

Permalink
Improve test coverage of codeact_agent folder (#5757)
Browse files Browse the repository at this point in the history
Co-authored-by: openhands <[email protected]>
Co-authored-by: Xingyao Wang <[email protected]>
Co-authored-by: Boxuan Li <[email protected]>
  • Loading branch information
4 people authored Dec 29, 2024
1 parent ebb2d86 commit 7f665c2
Show file tree
Hide file tree
Showing 2 changed files with 410 additions and 3 deletions.
4 changes: 2 additions & 2 deletions openhands/agenthub/codeact_agent/codeact_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(
- llm (LLM): The llm to be used by this agent
"""
super().__init__(llm, config)
self.pending_actions: deque[Action] = deque()
self.reset()

self.mock_function_calling = False
Expand Down Expand Up @@ -110,8 +111,6 @@ def __init__(
disabled_microagents=self.config.disabled_microagents,
)

self.pending_actions: deque[Action] = deque()

def get_action_message(
self,
action: Action,
Expand Down Expand Up @@ -340,6 +339,7 @@ def get_observation_message(
def reset(self) -> None:
"""Resets the CodeAct Agent."""
super().reset()
self.pending_actions.clear()

def step(self, state: State) -> Action:
"""Performs one step using the CodeAct Agent.
Expand Down
Loading

0 comments on commit 7f665c2

Please sign in to comment.