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
When I run Gemini model with multiple tools (FileTools and ShellTools), it gives the following error. I found that the issue was related with Gemini on older modals but it seems like they fixed it on model version 2. But still I got the error.
Traceback (most recent call last):
File "/Users/emre.savci/Desktop/my-projects/agents/code_agent/main.py", line 66, in <module>
team.cli_app()
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/phi/agent/agent.py", line 3217, in cli_app
self.print_response(message=message, stream=stream, markdown=markdown, **kwargs)
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/phi/agent/agent.py", line 2904, in print_response
run_response = self.run(message=message, messages=messages, stream=False, **kwargs)
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/phi/agent/agent.py", line 2070, in run
return next(resp)
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/phi/agent/agent.py", line 1842, in _run
model_response = self.model.response(messages=messages_for_model)
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/phi/model/google/gemini.py", line 636, in response
response: GenerateContentResponse = self.invoke(messages=messages)
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/phi/model/google/gemini.py", line 424, in invoke
return self.get_client().generate_content(contents=self.format_messages(messages))
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/generativeai/generative_models.py", line 331, in generate_content
response = self._client.generate_content(
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/ai/generativelanguage_v1beta/services/generative_service/client.py", line 830, in generate_content
response = rpc(
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/api_core/gapic_v1/method.py", line 131, in __call__
return wrapped_func(*args, **kwargs)
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/api_core/retry/retry_unary.py", line 293, in retry_wrapped_func
return retry_target(
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/api_core/retry/retry_unary.py", line 153, in retry_target
_retry_error_helper(
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/api_core/retry/retry_base.py", line 212, in _retry_error_helper
raise final_exc from source_exc
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/api_core/retry/retry_unary.py", line 144, in retry_target
result = target()
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/api_core/timeout.py", line 120, in func_with_timeout
return func(*args, **kwargs)
File "/Users/emre.savci/miniforge3/envs/agents/lib/python3.10/site-packages/google/api_core/grpc_helpers.py", line 78, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.InvalidArgument: 400 * GenerateContentRequest.tools[0].function_declarations[3].parameters.properties[args].items: missing field.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1737836329.282128 175371299 init.cc:232] grpc_wait_for_shutdown_with_timeout() timed out.
The text was updated successfully, but these errors were encountered:
When I run Gemini model with multiple tools (FileTools and ShellTools), it gives the following error. I found that the issue was related with Gemini on older modals but it seems like they fixed it on model version 2. But still I got the error.
GoogleCloudPlatform/generative-ai#636 (comment)
Here is my example code:
The text was updated successfully, but these errors were encountered: