Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown name \"additionalProperties\" error with (probably) Google Gemini #1820

Open
SwastikGorai opened this issue Sep 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SwastikGorai
Copy link

🐛 Describe the bug

litellm.llms.vertex_ai_and_google_ai_studio.common_utils.VertexAIError: {
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[0].parameters': Cannot find field.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "tools[0].function_declarations[0].parameters",
            "description": "Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[0].parameters': Cannot find field."
          }
        ]
      }
    ]
  }
}

The config file for my setup is:

{
    
    "graph_store": {
        "provider": "neo4j",
        "config" : {
            "url":  "url",
            "username": "uname",
            "password": "passwd"
        },
        "llm": {
            "provider": "litellm",
            "config": {
                "model": "gemini/gemini-1.5",
                "temperature": 0.2,
                "max_tokens": 1500,
            }
        }
    },
    
    "embedder": {
        "provider": "ollama",
        "config": {
            "model": "mxbai-embed-large",
            "embedding_dims": 1536
        }
    },
    
    "llm": {
        "provider": "litellm",
        "config": {
            "model": "gemini/gemini-1.5-flash",
            "temperature": 0.2,
            "max_tokens": 1500,
        }
    },
    
    "vector_store": {
        "provider": "qdrant",
        "config": {
            "embedding_model_dims": 1024
        }
    },
    
    "version": "v1.1"
}
  • But there seems that additionalProperties is present in tools[0].function_declarations[0].parameters
'tools': [{'function_declarations': [{'name': 'search', 'description': 'Search for nodes and relations in the graph.', 'parameters': {'type': 'object', 'properties': {'nodes': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of nodes to search for.'}, 'relations': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of relations to search for.'}}, 'required': ['nodes', 'relations'], 'additionalProperties': False}}]}]

Dependencies:

"langchain-community>=0.2.15",
"langchain-google-genai>=1.0.10",
"langchain-google-vertexai>=1.0.10",
"litellm>=1.44.14",
"mem0ai>=0.1.10",
"ollama>=0.3.2",
"rank-bm25>=0.2.2",

@Dev-Khant Dev-Khant added the bug Something isn't working label Sep 8, 2024
@Divyanshu9822
Copy link
Contributor

I faced same issue , raised in #1942
cc : @prateekchhikara @Dev-Khant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants