chat-gemini
Google Gemini provider for chat-rs.
Usage
use ;
let client = new
.with_model
.build;
let mut chat = new.with_model.build;
let mut msgs = from_user;
let response = chat.complete.await?;
Set GEMINI_API_KEY in your environment or call .with_api_key() on the builder.
Capabilities
- Completions — text generation with tool calling and structured output
- Streaming — token-by-token output (requires
streamfeature) - Embeddings — vector embeddings via
.with_embeddings(dimensions) - Extended thinking — enable with
.with_thoughts(true)
Native Tools
- Google Search —
.with_google_search()or.with_google_search_threshold(f32) - Code Execution —
.with_code_execution() - Google Maps —
.with_google_maps(lat_lng, widget)
Feature Flags
= { = "0.0.10", = ["gemini"] }
= { = "0.0.10", = ["gemini", "stream"] }