Skip to content

[BUG] function_schema_parser does not support new python union types #51

@JaredDobry

Description

@JaredDobry

Similar to #50
You can't do this:

@dataclass
class ExternalImageSearchResponse:
    result: None | external.ImageSearchResponse
    error: None | str

You must do this:

@dataclass
class ExternalImageSearchResponse:
    result: Optional[external.ImageSearchResponse]
    error: Optional[str]

or the parser throws an exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions