update: SWE Agent

This commit is contained in:
seeker 2024-07-03 22:37:17 +08:00
parent d571fe0f90
commit ca0cb7639f
3 changed files with 10 additions and 5 deletions

View file

@ -150,5 +150,7 @@ METAGPT_REPORTER_DEFAULT_URL = os.environ.get("METAGPT_REPORTER_URL", "")
# Metadata defines
AGENT = "agent"
SWE_WORKSPACE_ROOT = Path("/tmp/swe_workspace")
if not SWE_WORKSPACE_ROOT.exists():
SWE_WORKSPACE_ROOT.mkdir(parents=True)
# SWE agent
SWE_SETUP_PATH = METAGPT_ROOT / "metagpt/tools/swe_agent_commands/setup_default.sh"

View file

@ -25,7 +25,7 @@ class SWE(RoleZero):
tools: list[str] = ["Bash", "Browser:goto,scroll"]
terminal: Bash = Field(default_factory=Bash, exclude=True)
output_diff: str = ""
max_react_loop: int = 30
max_react_loop: int = 40
async def _think(self) -> bool:
self._set_system_msg()