Skip to content

Commit d1adaa7

Browse files
Refactor AgentTool constructor to include optional skip_summarization parameter
1 parent 5772225 commit d1adaa7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/google/adk/tools/agent_tool.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ class AgentTool(BaseTool):
4545
skip_summarization: Whether to skip summarization of the agent output.
4646
"""
4747

48-
def __init__(self, agent: BaseAgent):
48+
def __init__(self, agent: BaseAgent, skip_summarization: bool = False):
49+
"""Initialize the AgentTool with an agent and optional skip_summarization value."""
4950
self.agent = agent
50-
self.skip_summarization: bool = False
51-
"""Whether to skip summarization of the agent output."""
52-
51+
self.skip_summarization = skip_summarization
5352
super().__init__(name=agent.name, description=agent.description)
5453

5554
@model_validator(mode='before')

0 commit comments

Comments
 (0)