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

build function schemas with pydantic create_model #93

Merged
merged 3 commits into from
Sep 30, 2023
Merged

build function schemas with pydantic create_model #93

merged 3 commits into from
Sep 30, 2023

Conversation

shouples
Copy link
Collaborator

@shouples shouples commented Sep 30, 2023

This replaces the need for process_type and process_parameter to use a lot of the built-in parsing from pydantic's create_model function, allowing for function arguments with type annotations like sets, UUIDs, and other pydantic models themselves.

@shouples shouples requested a review from rgbkrk September 30, 2023 14:34
Copy link
Owner

@rgbkrk rgbkrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this is looking incredible. I didn't realize how much more we could lean on pydantic for picking up types out of the function signature.

'type': 'boolean',
"description": "A simple boolean field",
},
},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rules

@rgbkrk rgbkrk merged commit e3c3992 into rgbkrk:main Sep 30, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow schema generation for functions with pydantic model and UUID arguments
2 participants