mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-07 09:02:08 +00:00
refactor: Extract code execution tool to plugin
This commit is contained in:
parent
02de63a6e3
commit
63651deb9e
27 changed files with 415 additions and 180 deletions
|
|
@ -0,0 +1,14 @@
|
|||
from helpers.extension import Extension
|
||||
from agent import LoopData
|
||||
|
||||
|
||||
class CodeExecutionPrompt(Extension):
|
||||
|
||||
async def execute(
|
||||
self,
|
||||
system_prompt: list[str] = [],
|
||||
loop_data: LoopData = LoopData(),
|
||||
**kwargs,
|
||||
):
|
||||
prompt = self.agent.read_prompt("agent.system.tool.code_exe.md")
|
||||
system_prompt.append(prompt)
|
||||
Loading…
Add table
Add a link
Reference in a new issue