Hi all, I am building a chat bot using vertex ai, with access to multiple tool (e.g., a tool to access RAG, a tool to run an experiment, etc.). However I have found that I am getting this error:
```<_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv4:142.250.68.42:443 {created_time:"2024-05-12T18:15:58.005737-07:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"
>```
The error happens when I add 2 tools to the tools list when defining a model. However, tested separately, and the model works fine with just 1 tool (for both tools). Has anyone faced a similar problem? Do you know how to address it?
For reference, here are the code snippets I use to communicate with the API:
```
import vertexai
from vertexai.generative_models import (
GenerativeModel,
ChatSession,
Part,
Tool,
FunctionDeclaration
)
###
tools = [get_extra_content_tool, run_db_experiment_dedicated_env_tool]
gemini_model = GenerativeModel(
env('GEMINI_MODEL'),
tools=tools,
system_instruction=[main_bot_prompt]
)
###
chat = gemini_model.start_chat(response_validation=False)
###
# the error is throwing here, but it's connected to tools
gemini_response = chat.send_message(
[question],
generation_config=get_generation_config()
)
```