mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-27 09:46:24 +02:00
revert sweagent to use bash
This commit is contained in:
parent
33ac8c5109
commit
42544806bd
1 changed files with 9 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ from metagpt.prompts.di.swe_agent import (
|
|||
from metagpt.roles.di.role_zero import RoleZero
|
||||
from metagpt.schema import Message
|
||||
from metagpt.tools.libs.git import git_create_pull
|
||||
from metagpt.tools.libs.terminal import Terminal
|
||||
from metagpt.tools.libs.terminal import Bash
|
||||
|
||||
|
||||
class SWEAgent(RoleZero):
|
||||
|
|
@ -19,8 +19,13 @@ class SWEAgent(RoleZero):
|
|||
profile: str = "Issue Solver"
|
||||
goal: str = "Resolve GitHub issue or bug in any existing codebase"
|
||||
_instruction: str = NEXT_STEP_TEMPLATE
|
||||
tools: list[str] = ["Browser:goto,scroll", "RoleZero", "git_create_pull", "Editor", "Terminal"]
|
||||
terminal: Terminal = Field(default_factory=Terminal, exclude=True)
|
||||
tools: list[str] = [
|
||||
"Bash",
|
||||
"Browser:goto,scroll",
|
||||
"RoleZero",
|
||||
"git_create_pull",
|
||||
]
|
||||
terminal: Bash = Field(default_factory=Bash, exclude=True)
|
||||
output_diff: str = ""
|
||||
max_react_loop: int = 40
|
||||
run_eval: bool = False
|
||||
|
|
@ -33,6 +38,7 @@ class SWEAgent(RoleZero):
|
|||
def _update_tool_execution(self):
|
||||
self.tool_execution_map.update(
|
||||
{
|
||||
"Bash.run": self.terminal.run,
|
||||
"git_create_pull": git_create_pull,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue