Gemini_rs
A Rust client for interacting with Google's Gemini generative language models. Supports conversation memory, stateless calls, and easy integration.
Features
- Async chat with Gemini models
- Conversation memory (contextual chat)
- Simple, ergonomic API
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
API Key Setup
You need a Google Gemini API key. You can provide it directly or via environment variables using a .env file:
GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemini-2.5-flash
Or pass the key and model as arguments to Client::new.
Example Usage
use Client;
async
API Overview
Client::new(api_key, model)– create a new clientclient.chat(input)– send a message, get a response (with memory)client.chat_once(input)– stateless single messageclient.clear_memory()– clear conversation history