You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** Please make sure you read the contribution guide and file the issues in the rigth place. ** Contribution guide.
Describe the bug
Artifact/File Upload example not clear
To Reproduce
Steps to reproduce the behavior:
Follow the artifact/file upload example
Expected behavior
File should get uploaded/read by agent.
Screenshots
NA
Desktop (please complete the following information):
OS: Windows
Python version(python -V): 3.12.8
ADK version(pip show google-adk): 0.1.0
Additional context
Failed to parse the parameter context: google.adk.agents.callback_context.CallbackContext of function on_file_upload for automatic function calling.Automatic function calling works best with simpler function signature schema,consider manually parse your function declaration for function on_file_upload.
ERROR - fast_api.py:616 - Error in event_generator: Failed to parse the parameter context: google.adk.agents.callback_context.CallbackContext of function save_generated_report for automatic function calling.Automatic function calling works best with simpler function signature schema,consider manually parse your function declaration for function save_generated_report.
Traceback (most recent call last):
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/cli/fast_api.py", line 605, in event_generator
async for event in runner.run_async(
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/runners.py", line 197, in run_async
async for event in invocation_context.agent.run_async(invocation_context):
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/agents/base_agent.py", line 141, in run_async
async for event in self._run_async_impl(ctx):
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/agents/llm_agent.py", line 232, in _run_async_impl
async for event in self._llm_flow.run_async(ctx):
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 231, in run_async
async for event in self._run_one_step_async(invocation_context):
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 245, in _run_one_step_async
async for event in self._preprocess_async(invocation_context, llm_request):
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 283, in _preprocess_async
await tool.process_llm_request(
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/tools/base_tool.py", line 96, in process_llm_request
if (function_declaration := self._get_declaration()) is None:
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/tools/function_tool.py", line 42, in _get_declaration
build_function_declaration(
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/tools/_automatic_function_calling_util.py", line 232, in build_function_declaration
from_function_with_options(func, variant)
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/tools/_automatic_function_calling_util.py", line 309, in from_function_with_options
schema = function_parameter_parse_util._parse_schema_from_parameter(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/naveenkumar/Gits/perf_tools_google_agent/.venv/lib/python3.12/site-packages/google/adk/tools/function_parameter_parse_util.py", line 292, in _parse_schema_from_parameter
raise ValueError(
ValueError: Failed to parse the parameter context: google.adk.agents.callback_context.CallbackContext of function save_generated_report for automatic function calling.Automatic function calling works best with simpler function signature schema,consider manually parse your function declaration for function save_generated_report.
Hello, Is there any solution for this??
Have you found a way to upload a file via the ADK web UI, save it as an artifact, and then load it for use in subsequent functions?"
Activity
boyangsvl commentedon Apr 19, 2025
Could you provide a full stack trace?
QAInsights commentedon Apr 19, 2025
@boyangsvl
hangfei commentedon May 31, 2025
Could you retry if this is fixed in latest wheel? @QAInsights
dominicdev commentedon Jun 12, 2025
how to upload file for artifact? example if none web
DeanChensj commentedon Jun 16, 2025
@dominicdev you can find example code in https://google.github.io/adk-docs/artifacts/#what-are-artifacts
saeed-git-123 commentedon Aug 20, 2025
Hello, Is there any solution for this??
Have you found a way to upload a file via the ADK web UI, save it as an artifact, and then load it for use in subsequent functions?"