Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zaidhaan
Copy link

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 the output_type remains the correct type (e.g. IntEnum).

For an example, please reference the linked issue.

@zaidhaan
Copy link
Author

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.

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.

[Gemini] IntEnum output not supported
1 participant