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

Refactor the type system #1441

Draft
wants to merge 9 commits into
base: v1.0
Choose a base branch
from
Draft

Refactor the type system #1441

wants to merge 9 commits into from

Conversation

rlouf
Copy link
Member

@rlouf rlouf commented Feb 23, 2025

Following the discussion in #1433. Closes #1421. Closes #1420. Closes #1218. Closes #1223.

@rlouf rlouf force-pushed the types branch 3 times, most recently from a41a411 to 69fb69b Compare February 24, 2025 23:53
@rlouf
Copy link
Member Author

rlouf commented Feb 24, 2025

I am fairly happy with where I got so far with the Gemini integration. We will obviously need a set of utility functions for the types: is_enum, is_typeddict, is_pydantic_basemodel, etc that will be re-used across the library.

We are currently using intermediate `Json`, `Choice` and `List` classes
which, in addition to being cumbersome, are not useful abstractions.
This commit bypasses these abstractions to handle the output types
directly at the level of `GeminiTypeAdapter`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant