Skip to main content

Module api_types

Module api_types 

Source
Expand description

Wire types of the generateContent responses (requests are built as JSON objects in crate::request).

Structs§

Candidate
A response candidate.
CandidateContent
Content of a candidate.
CodeExecutionResult
Result of the code execution tool.
ExecutableCode
Code generated by the code execution tool.
FunctionCall
A function call part.
GenerateContentResponse
A generateContent response or stream chunk.
GroundingChunk
A grounding chunk.
ImageChunk
An image grounding chunk.
InlineData
Inline binary data ({mimeType, data} with base64 data).
Part
A content part.
RetrievedContextChunk
A retrieved-context grounding chunk.
RpcStatus
google.rpc.Status as embedded in operations and batch result lines.
ServerToolCall
A server-side tool call ({toolType, args, id}).
UsageMetadata
Token usage (usageMetadata).
WebChunk
A web (or maps) grounding chunk.

Functions§

deserialize_count
Deserializes a count that the API renders either as a number or as a decimal string ("42"); anything else becomes None.