-
Notifications
You must be signed in to change notification settings - Fork 905
Add support for non-string enums in Gemini #1564
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
Conversation
I might need a bit of assistance with setting up tests. Not too familiar with pytest and how it's used in this codebase. Or if someone is willing, there's an example in the linked issue that can be used as a test case. |
@zaidhaan Thanks, the implementation looks good. Did you see the tests in |
Hey, sorry for the late reply..! been a bit of a busy week for me. Thanks for offering assistance @DouweM, I didn't notice that tests like Not sure how we want to proceed though, seems tboser's PR had their runs cancelled for some reason. EDIT: In the mean time, I'll cherry-pick your commit onto this branch and keep an eye on CI |
I'm not sure why tests on 3.12 and 3.13 are failing. Seems to be occurring in other PRs too |
sweet no worries, didn't want to steal your work but excited to get this fix in! |
Closes #1553.
Gemini requires that enums must consist of only string members (e.g. currently
IntEnum
will cause a failure.). This PR modifies the_GeminiJsonSchema
to reflect this, whilst still making it such that theoutput_type
remains the correct type (e.g.IntEnum
).For an example, please reference the linked issue.