Skip to content

feat: introduce from_json_schema classmethod to Schema class to allow conversion from JSONSchema class object to Schema class object #697

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Apr 17, 2025

feat: introduce from_json_schema classmethod to Schema class to allow conversion from JSONSchema class object to Schema class object

… conversion from JSONSchema class object to Schema class object

PiperOrigin-RevId: 750027090
@copybara-service copybara-service bot merged commit 899fa1a into main Apr 22, 2025
@copybara-service copybara-service bot deleted the copybara/748500443 branch April 22, 2025 03:59
@jayeshp19
Copy link
Contributor

Hey @yyyu-google , thanks for adding this functionality. One thing though, we still have to manually convert our schema to the SDK’s JSONSchema class.
Would it be possible to support raw schema or Pydantic model schema directly? Otherwise, we'll still need to handle the conversion manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants