-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
question[Component] This issue is asking a question or clarification[Component] This issue is asking a question or clarification
Description
sometimes Gemini calls function with wrong tool name, will cause a ValueError, how can I handle this Error
line 447, in _run_one_step_async
async for event in agen:
File "/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 539, in _postprocess_async
async for event in agen:
File "/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 632, in _postprocess_handle_function_calls_async
if function_response_event := await functions.handle_function_calls_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 198, in handle_function_calls_async
return await handle_function_call_list_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 246, in handle_function_call_list_async
function_response_events = await asyncio.gather(*tasks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 280, in _execute_single_function_call_async
tool, tool_context = _get_tool_and_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 651, in _get_tool_and_context
raise ValueError(
ValueError: Function add_-plan_step is not found in the tools_dict
lucasbarzotto-axonify and cgfandia-tii
Metadata
Metadata
Assignees
Labels
question[Component] This issue is asking a question or clarification[Component] This issue is asking a question or clarification