Expand description
Gemini language model (generateContent / streamGenerateContent).
Structs§
- Google
Language Model - Language model backed by
generateContent.
Constants§
- EXTERNAL_
URL_ MEDIA_ TYPES - Media types the Gemini API fetches from arbitrary HTTPS URLs.
- FAMILY
- Provider id family of the language model.
Functions§
- base_
supported_ urls - URLs every Gemini request accepts: Files API URIs (public endpoint and the configured base URL) and YouTube videos.
- convert_
generate_ content_ response - Converts a parsed
generateContentresponse (rawis the original JSON) into a result usingmappingto restore custom tool names;warningsare attached to the result. - is_
gemini_ model - Whether
model_idis a Gemini model (used by the image model). - supported_
urls - Supported URLs of
model_id: the base set plus, for Gemini models other than Gemini 2.0, any HTTPS URL forEXTERNAL_URL_MEDIA_TYPES.