rust-genai 0.3.1

Rust SDK for the Google Gemini API and Vertex AI
Documentation
1
2
3
4
5
6
7
8
9
use rust_genai::Client;

#[tokio::main]
async fn main() -> rust_genai::Result<()> {
    let client = Client::from_env()?;
    let file = client.files().upload_from_path("README.md").await?;
    println!("uploaded: {:?}", file.name);
    Ok(())
}