sigoden / aichat

All-in-one AI CLI tool that integrates 20+ AI platforms, including OpenAI, Azure-OpenAI, Gemini, Claude, Mistral, Cohere, VertexAI, Bedrock, Ollama, Ernie, Qianwen, Deepseek...
Apache License 2.0
3.27k stars 217 forks source link

fix: gemini with functions that have empty parameters #666

Closed sigoden closed 3 days ago

sigoden commented 3 days ago

When we call a function without parameters in Gemini (not Vertex AI), It throws error:

Failed to call chat-completions api

Caused by:
    Request contains an invalid argument. (status: INVALID_ARGUMENT)
  {
    "name": "get_current_time",
    "description": "Get the current time.",
    "parameters": {
      "type": "object",
      "properties": {},
      "required": []
    }
  },