mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-23 15:48:11 +02:00
add sweagent to env
This commit is contained in:
parent
caaf42987d
commit
715e25f9b1
2 changed files with 6 additions and 2 deletions
|
|
@ -4,14 +4,13 @@ import os
|
|||
from pydantic import Field
|
||||
|
||||
from metagpt.logs import logger
|
||||
from metagpt.prompts.di.swe import (
|
||||
from metagpt.prompts.di.swe_agent import (
|
||||
MINIMAL_EXAMPLE,
|
||||
NEXT_STEP_TEMPLATE,
|
||||
SWE_AGENT_SYSTEM_TEMPLATE,
|
||||
)
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue