gemini-rs 0.2.1

A library to interact with the Google Gemini API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use gemini_rs::Conversation;

#[tokio::main]
async fn main() {
    let mut convo = Conversation::new(
        std::env::var("GEMINI_API_KEY").unwrap(),
        "gemini-1.5-flash".to_string()
    );

    let a = convo.prompt("If you had to describe risk of rain 2 in one word, what word would it be? dont say anything more").await.unwrap();
    println!("{0:?}", a.text);
    let b = convo.prompt("Now explain your reasoning").await.unwrap();
    println!("{0:?}", b.text);
}