|
11 | 11 | from ag_ui.core import (
|
12 | 12 | RunAgentInput, BaseEvent, EventType,
|
13 | 13 | RunStartedEvent, RunFinishedEvent, RunErrorEvent,
|
14 |
| - TextMessageStartEvent, TextMessageContentEvent, TextMessageEndEvent, |
15 |
| - StateSnapshotEvent, StateDeltaEvent, |
16 |
| - Context, ToolMessage, ToolCallEndEvent, SystemMessage,ToolCallResultEvent |
| 14 | + ToolCallEndEvent, SystemMessage,ToolCallResultEvent |
17 | 15 | )
|
18 | 16 |
|
19 | 17 | from google.adk import Runner
|
@@ -406,7 +404,7 @@ async def _handle_tool_result_submission(
|
406 | 404 | # Extract tool results that is send by the frontend
|
407 | 405 | tool_results = await self._extract_tool_results(input)
|
408 | 406 |
|
409 |
| - # if the tool results are not send by the fronted then call the tool function |
| 407 | + # if the tool results are not sent by the fronted then call the tool function |
410 | 408 | if not tool_results:
|
411 | 409 | logger.error(f"Tool result submission without tool results for thread {thread_id}")
|
412 | 410 | yield RunErrorEvent(
|
@@ -476,7 +474,7 @@ async def _extract_tool_results(self, input: RunAgentInput) -> List[Dict]:
|
476 | 474 | tool_name = tool_call_map.get(most_recent_tool_message.tool_call_id, "unknown")
|
477 | 475 |
|
478 | 476 | # Debug: Log the extracted tool message
|
479 |
| - logger.info(f"Extracted most recent ToolMessage: role={most_recent_tool_message.role}, tool_call_id={most_recent_tool_message.tool_call_id}, content='{most_recent_tool_message.content}'") |
| 477 | + logger.debug(f"Extracted most recent ToolMessage: role={most_recent_tool_message.role}, tool_call_id={most_recent_tool_message.tool_call_id}, content='{most_recent_tool_message.content}'") |
480 | 478 |
|
481 | 479 | return [{
|
482 | 480 | 'tool_name': tool_name,
|
@@ -819,7 +817,7 @@ async def _run_adk_in_background(
|
819 | 817 | content = tool_msg['message'].content
|
820 | 818 |
|
821 | 819 | # Debug: Log the actual tool message content we received
|
822 |
| - logger.info(f"Received tool result for call {tool_call_id}: content='{content}', type={type(content)}") |
| 820 | + logger.debug(f"Received tool result for call {tool_call_id}: content='{content}', type={type(content)}") |
823 | 821 |
|
824 | 822 | # Parse JSON content, handling empty or invalid JSON gracefully
|
825 | 823 | try:
|
|
0 commit comments