mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
Merge branch 'tl_env_add_swe' into 'mgx_ops'
add sweagent to env See merge request pub/MetaGPT!203
This commit is contained in:
commit
513b7fbbe7
2 changed files with 5 additions and 1 deletions
|
|
@ -11,7 +11,6 @@ from metagpt.prompts.di.swe_agent import (
|
|||
)
|
||||
from metagpt.roles.di.role_zero import RoleZero
|
||||
from metagpt.tools.libs.terminal import Bash
|
||||
from metagpt.tools.swe_agent_commands.swe_agent_utils import extract_patch
|
||||
|
||||
|
||||
class SWEAgent(RoleZero):
|
||||
|
|
@ -72,6 +71,9 @@ class SWEAgent(RoleZero):
|
|||
|
||||
This function is specifically added for SWE bench evaluation.
|
||||
"""
|
||||
# only import when evaluation is needed
|
||||
from metagpt.tools.swe_agent_commands.swe_agent_utils import extract_patch
|
||||
|
||||
commands, ok = await self._parse_commands()
|
||||
if not ok:
|
||||
return
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ from metagpt.environment.mgx.mgx_env import MGXEnv
|
|||
from metagpt.roles import Architect, Engineer, ProductManager, ProjectManager
|
||||
from metagpt.roles.di.data_analyst import DataAnalyst
|
||||
from metagpt.roles.di.engineer2 import Engineer2
|
||||
from metagpt.roles.di.swe_agent import SWEAgent
|
||||
from metagpt.roles.di.team_leader import TeamLeader
|
||||
from metagpt.schema import Message
|
||||
|
||||
|
|
@ -26,6 +27,7 @@ async def main(requirement="", enable_human_input=False, use_fixed_sop=False):
|
|||
engineer,
|
||||
# QaEngineer(),
|
||||
DataAnalyst(tools=["<all>"]),
|
||||
SWEAgent(),
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue