mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-28 11:40:47 +00:00
browser_agent improvements, prompts adjustments
This commit is contained in:
parent
aadc111b31
commit
a6f236f7fa
10 changed files with 120 additions and 46 deletions
|
|
@ -3,6 +3,7 @@ from dataclasses import dataclass
|
|||
|
||||
from agent import Agent
|
||||
from python.helpers.print_style import PrintStyle
|
||||
from python.helpers.strings import sanitize_string
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
@ -33,11 +34,11 @@ class Tool:
|
|||
PrintStyle().print()
|
||||
|
||||
async def after_execution(self, response: Response, **kwargs):
|
||||
text = response.message.strip()
|
||||
text = sanitize_string(response.message.strip())
|
||||
self.agent.hist_add_tool_result(self.name, text)
|
||||
PrintStyle(font_color="#1B4F72", background_color="white", padding=True, bold=True).print(f"{self.agent.agent_name}: Response from tool '{self.name}'")
|
||||
PrintStyle(font_color="#85C1E9").print(response.message)
|
||||
self.log.update(content=response.message)
|
||||
PrintStyle(font_color="#85C1E9").print(text)
|
||||
self.log.update(content=text)
|
||||
|
||||
def get_log_object(self):
|
||||
if self.method:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue