mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Add experimental feature to use parameters_json_schema and response_json_schema for McpTool
Co-authored-by: Xuan Yang <xygoogle@google.com> PiperOrigin-RevId: 833144947
This commit is contained in:
committed by
Copybara-Service
parent
f7f6837fde
commit
1dd97f5b45
@@ -364,9 +364,15 @@ def _build_function_declaration_log(
|
||||
k: v.model_dump(exclude_none=True)
|
||||
for k, v in func_decl.parameters.properties.items()
|
||||
})
|
||||
elif func_decl.parameters_json_schema:
|
||||
param_str = str(func_decl.parameters_json_schema)
|
||||
|
||||
return_str = ''
|
||||
if func_decl.response:
|
||||
return_str = '-> ' + str(func_decl.response.model_dump(exclude_none=True))
|
||||
elif func_decl.response_json_schema:
|
||||
return_str = '-> ' + str(func_decl.response_json_schema)
|
||||
|
||||
return f'{func_decl.name}: {param_str} {return_str}'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user