mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-30 19:36:24 +02:00
add code_review tool to engineer2 to enhance code effectiveness
This commit is contained in:
parent
f95a62b5df
commit
63a41ba81d
4 changed files with 105 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from metagpt.actions.di.rewrite_code import RewriteCode
|
||||
from metagpt.prompts.di.engineer2 import ENGINEER2_INSTRUCTION
|
||||
from metagpt.roles.di.role_zero import RoleZero
|
||||
|
||||
|
|
@ -10,4 +11,14 @@ class Engineer2(RoleZero):
|
|||
goal: str = "Take on game, app, and web development"
|
||||
instruction: str = ENGINEER2_INSTRUCTION
|
||||
|
||||
tools: str = ["Plan", "Editor:write,read,write_content", "RoleZero"]
|
||||
tools: str = ["Plan", "Editor:write,read,write_content", "RoleZero", "RewriteCode"]
|
||||
|
||||
def _update_tool_execution(self):
|
||||
rewrite_code = RewriteCode()
|
||||
|
||||
self.tool_execution_map.update(
|
||||
{
|
||||
"RewriteCode.run": rewrite_code.run,
|
||||
"RewriteCode": rewrite_code.run,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue