Skip to main content

Module output

Module output 

Source
Expand description

Mapping of generateContent responses to specification content, usage, finish reasons and provider metadata.

Structs§

OutputMapper
Maps response parts to content and builds provider metadata.

Functions§

convert_usage
Converts usageMetadata; raw is the original object.
document_media_type
Media type of a retrieved document by file extension.
has_client_tool_calls
Whether content contains a tool call executed by the client.
map_finish_reason
Maps a Gemini finish reason.
raw_usage
usageMetadata object of a raw response.