Crates.io | gemini-live-api |
lib.rs | gemini-live-api |
version | 0.1.1 |
source | src |
created_at | 2025-05-09 20:12:43.052128+00 |
updated_at | 2025-05-09 21:36:20.471511+00 |
description | Crate to interact with the Gemini live API |
homepage | |
repository | |
max_upload_size | |
id | 1667617 |
size | 159,434 |
A Rust client for real-time, bidirectional communication with Google's Gemini large language models via WebSockets. This crate enables interactive conversations, function calling, and streaming responses, with flexible state management for your application.
It's built on tokio
for asynchronous operations and serde
for robust JSON handling.
#[tool_function]
procedural macro.GeminiLiveClient<S>
is generic over a state type S
.S
(wrapped in Arc<S>
) is accessible within tool functions and can be captured by event handlers.Arc<Mutex<T>>
within your state S
) for concurrent modifications.on_server_content
(for model responses, text, turn completion) and on_usage_metadata
.async/await
based using tokio
.