update: SWE Agent

This commit is contained in:
seeker 2024-07-04 16:07:22 +08:00
parent 5c0f490c04
commit 816a6eadde
5 changed files with 36 additions and 30 deletions

View file

@ -2,7 +2,7 @@ import subprocess
import threading
from queue import Queue
from metagpt.const import SWE_SETUP_PATH, SWE_WORKSPACE_ROOT
from metagpt.const import DEFAULT_WORKSPACE_ROOT, SWE_SETUP_PATH
from metagpt.tools.tool_registry import register_tool
from metagpt.utils.report import END_MARKER_VALUE, TerminalReporter
@ -142,7 +142,7 @@ class Bash(Terminal):
def __init__(self):
"""init"""
super().__init__()
self.run_command(f"cd {SWE_WORKSPACE_ROOT}")
self.run_command(f"cd {DEFAULT_WORKSPACE_ROOT}")
self.run_command(f"source {SWE_SETUP_PATH}")
def run(self, cmd) -> str:

View file

@ -1,5 +1,5 @@
"""
This tool is originally developed by the team behind the princeton-nlp/SWE-agent repository.
This folder is borrowed from princeton-nlp/SWE-agent
You can find the original repository here:
https://github.com/princeton-nlp/SWE-agent/tree/main/config/commands
We are using a modified version from OpenDevin: