You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently Google released Structured Outputs for Gemini (much like OpenAI).
Should be fairly simple to enable this by updating setup_call for gemini and updating the warning to include gemini as a module that supports strict in the response model schema (although it seems like structured outputs for tools is not quite supported).
Only difficulty I can see right now is that the only two supported inputs are either raw type annotations (so no BaseModel) or their genai.protos.Schema type (which will require conversion from BaseModel). Should have most of this implemented already I believe, so still shouldn't be terribly difficult.
The text was updated successfully, but these errors were encountered:
Description
Recently Google released Structured Outputs for Gemini (much like OpenAI).
Should be fairly simple to enable this by updating
setup_call
forgemini
and updating the warning to includegemini
as a module that supportsstrict
in the response model schema (although it seems like structured outputs for tools is not quite supported).See: https://ai.google.dev/gemini-api/docs/json-mode?lang=python#supply-schema-in-config
Only difficulty I can see right now is that the only two supported inputs are either raw type annotations (so no
BaseModel
) or theirgenai.protos.Schema
type (which will require conversion fromBaseModel
). Should have most of this implemented already I believe, so still shouldn't be terribly difficult.The text was updated successfully, but these errors were encountered: