mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix MangenticAgentExecutor producing repr str for tool call content (#2566)
This commit is contained in:
committed by
GitHub
Unverified
parent
cb343dd707
commit
c2d285e614
@@ -1727,7 +1727,7 @@ class MagenticAgentExecutor(Executor):
|
||||
last: ChatMessage = messages[-1]
|
||||
author = last.author_name or self._agent_id
|
||||
role: Role = last.role if last.role else Role.ASSISTANT
|
||||
text = last.text or str(last)
|
||||
text = last.text or ""
|
||||
msg = ChatMessage(role=role, text=text, author_name=author)
|
||||
await self._emit_agent_message_event(ctx, msg)
|
||||
return msg
|
||||
|
||||
@@ -1274,7 +1274,7 @@ class MessageMapper:
|
||||
"trace_type": "magentic_orchestrator",
|
||||
"orchestrator_id": orchestrator_id,
|
||||
"kind": kind,
|
||||
"text": text or str(message),
|
||||
"text": text or "",
|
||||
"timestamp": datetime.now().isoformat(),
|
||||
},
|
||||
span_id=f"magentic_orch_{uuid4().hex[:8]}",
|
||||
|
||||
Reference in New Issue
Block a user