mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-05 09:58:45 +00:00
agent response improvements
This commit is contained in:
1 parent
3daf2f9f8c
commit
73e6855345
11 files changed
+815
-538
No files matched your search
@@ -1,13 +1,15 @@
|
||||
from python.helpers.tool import Tool, Response
|
||||
|
||||
|
||||
class ResponseTool(Tool):
|
||||
|
||||
async def execute(self,**kwargs):
|
||||
async def execute(self, **kwargs):
|
||||
return Response(message=self.args["text"], break_loop=True)
|
||||
|
||||
async def before_execution(self, **kwargs):
|
||||
self.log = self.agent.context.log.log(type="response", heading=f"{self.agent.agent_name}: Responding", content=self.args.get("text", ""))
|
||||
# self.log = self.agent.context.log.log(type="response", heading=f"{self.agent.agent_name}: Responding", content=self.args.get("text", ""))
|
||||
# don't log here anymore, we have the live_response extension now
|
||||
pass
|
||||
|
||||
|
||||
async def after_execution(self, response, **kwargs):
|
||||
pass # do not add anything to the history or output
|
||||
pass # do not add anything to the history or output
|
||||
Reference in new issue
Block a user