mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-30 04:30:36 +00:00
messages redesign wip
This commit is contained in:
parent
e15b959eee
commit
a769cb858f
21 changed files with 808 additions and 741 deletions
|
|
@ -5,15 +5,15 @@ import asyncio
|
|||
from python.helpers.log import LogItem
|
||||
from python.helpers import log
|
||||
import math
|
||||
|
||||
from python.extensions.before_main_llm_call._10_log_for_stream import build_heading, build_default_heading
|
||||
|
||||
class LogFromStream(Extension):
|
||||
|
||||
async def execute(self, loop_data: LoopData = LoopData(), text: str = "", **kwargs):
|
||||
|
||||
# thought length indicator
|
||||
length = math.ceil(len(text) / 10) * 10
|
||||
heading = f"{self.agent.agent_name}: Reasoning ({length})..."
|
||||
pipes = "|" * math.ceil(math.sqrt(len(text)))
|
||||
heading = build_heading(self.agent, f"Reasoning.. {pipes}")
|
||||
|
||||
# create log message and store it in loop data temporary params
|
||||
if "log_item_generating" not in loop_data.params_temporary:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue