Crate gemini_rust

Crate gemini_rust 

Source
Expand description

§gemini-rust

A Rust client library for Google’s Gemini 2.0 API.

Structs§

Batch
Represents a long-running batch operation, providing methods to manage its lifecycle.
BatchBuilder
A builder for creating and executing synchronous batch content generation requests.
BatchConfig
Batch configuration
BatchMetadata
Metadata for the batch operation
BatchOperationResponse
Represents the response of a batch operation.
BatchRequestItem
Individual batch request item
BatchStats
Statistics for the batch
Blob
Blob for a message part
Candidate
A candidate response
CitationMetadata
Citation metadata for content
Content
Content of a message
ContentBuilder
Builder for content generation requests
FunctionCall
A function call made by the model
FunctionDeclaration
Declaration of a function that can be called by the model
FunctionParameters
Parameters for a function
Gemini
Client for the Gemini API
GenerateContentRequest
Request to generate content
GenerationConfig
Configuration for generation
GenerationResponse
Response from the Gemini API for content generation
InlinedResponses
A container for inlined responses.
InputConfig
Input configuration for batch requests
Message
Message in a conversation
OutputConfig
Represents the output configuration of a batch operation.
PromptTokenDetails
Details about prompt tokens by modality
PropertyDetails
Details about a property
RequestMetadata
Metadata for batch request
RequestsContainer
Container for requests
SafetyRating
Safety rating for content
ThinkingConfig
Configuration for thinking (Gemini 2.5 series only)
UsageMetadata
Metadata about token usage

Enums§

BatchGenerateContentResponseItem
An item in a batch generate content response.
BatchResultItem
The outcome of a single request in a batch operation.
BatchState
The state of a batch operation.
BatchStatus
Represents the overall status of a batch operation.
Error
Errors that can occur when using the Gemini API
FunctionCallingMode
Mode for function calling
Part
Content part that can be included in a message
Role
Role of a message in a conversation
TaskType
Embedding Task types
Tool
Tool that can be used by the model

Type Aliases§

Result
Result type for this crate