mirror of
https://github.com/microsoft/autogen.git
synced 2026-02-11 14:05:00 -05:00
Improve printing further (#172)
* Improve pretty printing * Improve printing further
This commit is contained in:
@@ -29,18 +29,10 @@ class RoundRobinOrchestrator(TypeRoutedAgent):
|
||||
if isinstance(message.content, UserMessage) or isinstance(message.content, AssistantMessage):
|
||||
source = message.content.source
|
||||
|
||||
assert isinstance(source, str)
|
||||
content = str(message.content.content)
|
||||
|
||||
current_timestamp = datetime.now().isoformat()
|
||||
logger.info(
|
||||
OrchestrationEvent(
|
||||
current_timestamp,
|
||||
f"""{source}:
|
||||
|
||||
{message.content.content}
|
||||
-------------------------------------""",
|
||||
)
|
||||
)
|
||||
logger.info(OrchestrationEvent(current_timestamp, source, content))
|
||||
|
||||
if self._num_rounds > 20:
|
||||
return
|
||||
@@ -53,10 +45,8 @@ class RoundRobinOrchestrator(TypeRoutedAgent):
|
||||
logger.info(
|
||||
OrchestrationEvent(
|
||||
current_timestamp,
|
||||
f"""Orchestrator (thought):
|
||||
|
||||
Next speaker {next_agent.metadata['name']}
|
||||
-------------------------------------""",
|
||||
source="Orchestrator (thought)",
|
||||
message=f"Next speaker {next_agent.metadata['name']}" "",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -16,4 +16,5 @@ class RequestReplyMessage:
|
||||
@dataclass
|
||||
class OrchestrationEvent:
|
||||
timestamp: str
|
||||
source: str
|
||||
message: str
|
||||
|
||||
Reference in New Issue
Block a user