"tool_choice": "required"
in the SDK or the API as per OpenAI format { "model": "gemini-1.5-pro", "max_tokens": 200, "stream": false, "messages": [ { "role": "system", "content": "Say Hi" }, { "role": "user", "content": "Hey, what is the temperature in San Francisco in Celsius? Also tell me the current time" } ], "tool_choice": "required", "tools": [ .... ] }