-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
If model doesn't support examples in schema it dies
APIError('litellm.BadRequestError: VertexAIException BadRequestError - b\'{\\n "error": {\\n "code": 400,\\n "message":
"Invalid JSON payload received. Unknown name \\\\"examples\\\\" at
\\\'tools[0].function_declarations[0].parameters.properties[2].value.items\\\': Cannot find field.",\\n "status":
"INVALID_ARGUMENT",\\n "details": [\\n {\\n "@type": "type.googleapis.com/google.rpc.BadRequest",\\n
"fieldViolations": [\\n {\\n "field": "tools[0].function_declarations[0].parameters.properties[2].value.items",\\n
"description": "Invalid JSON payload received. Unknown name \\\\"examples\\\\" at
\\\'tools[0].function_declarations[0].parameters.properties[2].value.items\\\': Cannot find field."\\n }\\n ]\\n }\\n ]\\n
}\\n}\\n\'')Traceback (most recent call last):
same code works with
ChatOpenAI(model="gpt-4o"
but doesnt work with gemini2.
class Profile(BaseModel):
name: Optional[str] = Field(description="The name of the person", default=None)
profile_extractor = create_extractor(
llm=llm,
tools=[Profile],
tool_choice="Profile"
)
Metadata
Metadata
Assignees
Labels
No labels