-
Notifications
You must be signed in to change notification settings - Fork 384
Open
Labels
bugSomething isn't workingSomething isn't working
Description
First check
- I added a descriptive title to this issue.
- I used the GitHub search to try to find a similar issue and didn't find one.
- I searched the Marvin documentation for this issue.
Bug summary
I encountered an error while working with complex types - it seems that using nested types with lists will break the schema. Including the ComplexType causes an error response "Invalid schema for function".
Reproduction
from pydantic import BaseModel
from typing import List
class SimpleType(BaseModel):
name: str
value: str
class ComplexType(BaseModel):
name: str
value: List[SimpleType]
class MarvinParseResult(BaseModel):
simple_type: SimpleType
complex_type: ComplexType # Comment this out and it passesError
'Error code: 400 - {\'error\': {\'message\': "Invalid schema for function \'FormatResponse\'. Please ensure it is a valid JSON Schema.", \'type\': \'invalid_request_error\', \'param\': \'tools[0].function.parameters\', \'code\': \'invalid_function_parameters\'}}Versions
Version: 2.3.3
Python version: 3.10.12
OS/Arch: linux/x86_64
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working