Here’s the error I see
"error": {
E "code": 400,
E "message": "Request contains an invalid argument.",
E "status": "INVALID_ARGUMENT"
E }
E }
Here’s the request I sent to AI studio
curl -X POST \
https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=AI*********** \
-H 'Content-Type: *****' \
-d '{'contents': [{'role': 'user', 'parts': [{'text': "What's the weather like in Boston today in Fahrenheit?"}]}], 'tools': [{'function_declarations': [{'name': 'get_current_weather', 'description': 'Get the current weather in a given location', 'parameters': {'type': 'object', 'properties': {'location': {'type': 'string', 'description': 'The city and state, e.g. San Francisco, CA'}, 'unit': {'type': 'string', 'enum': ['celsius', 'fahrenheit']}}, 'required': ['location']}}]}], 'toolConfig': {'functionCallingConfig': {'mode': 'ANY', 'allowed_function_names': ['get_current_weather']}}}'