From d1adaa76685dd594e706a42a3d69b765768ceb52 Mon Sep 17 00:00:00 2001 From: Sai Chandan Kadarla <138595704+ChandanInfonetica@users.noreply.github.com> Date: Mon, 14 Apr 2025 08:45:24 +0000 Subject: [PATCH] Refactor AgentTool constructor to include optional skip_summarization parameter --- src/google/adk/tools/agent_tool.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/google/adk/tools/agent_tool.py b/src/google/adk/tools/agent_tool.py index 460a83fc9f6..33a12e7a797 100644 --- a/src/google/adk/tools/agent_tool.py +++ b/src/google/adk/tools/agent_tool.py @@ -45,11 +45,10 @@ class AgentTool(BaseTool): skip_summarization: Whether to skip summarization of the agent output. """ - def __init__(self, agent: BaseAgent): + def __init__(self, agent: BaseAgent, skip_summarization: bool = False): + """Initialize the AgentTool with an agent and optional skip_summarization value.""" self.agent = agent - self.skip_summarization: bool = False - """Whether to skip summarization of the agent output.""" - + self.skip_summarization = skip_summarization super().__init__(name=agent.name, description=agent.description) @model_validator(mode='before')