Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions veadk/cli/studio/fast_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from fastapi.staticfiles import StaticFiles
from google.adk.agents.run_config import RunConfig, StreamingMode
from google.genai import types
from pydantic import BaseModel

from veadk.cli.studio.models import (
GetAgentResponse,
Expand Down Expand Up @@ -151,6 +152,14 @@ async def runner_run_sse(user_text: str):
yield f"data: {json.dumps(TOOL_INPUT_AVAILABLE)}\n\n"

for function_response in event.get_function_responses():
# for load_memory and load_knowledgebase tools, the output is based BaseModel
# we have to convert it
for key, value in function_response.response.items():
if isinstance(value, BaseModel):
function_response.response[key] = value.model_dump(
exclude_none=False
)

TOOL_OUTPUT_AVAILABLE = {
"type": "tool-output-available",
"toolCallId": function_response.id,
Expand Down