mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Update AgentTool to use Agent's description when input_schema is provided in FunctionDeclaration
Co-authored-by: Xuan Yang <xygoogle@google.com> PiperOrigin-RevId: 835379243
This commit is contained in:
committed by
Copybara-Service
parent
777dba3033
commit
52674e7fac
@@ -79,6 +79,8 @@ class AgentTool(BaseTool):
|
||||
result = _automatic_function_calling_util.build_function_declaration(
|
||||
func=self.agent.input_schema, variant=self._api_variant
|
||||
)
|
||||
# Override the description with the agent's description
|
||||
result.description = self.agent.description
|
||||
else:
|
||||
result = types.FunctionDeclaration(
|
||||
parameters=types.Schema(
|
||||
|
||||
Reference in New Issue
Block a user