mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 04:00:26 +00:00
agent response improvements
This commit is contained in:
parent
3daf2f9f8c
commit
73e6855345
11 changed files with 815 additions and 538 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue