#ai #baichat #theb

bin+lib baichat-rs

BAI Chat/ThebAI in Rust

1 unstable release

0.1.0 Jun 17, 2023

#683 in Machine learning

GPL-3.0-or-later

12KB
102 lines

Theb.ai / BAI Chat

Installation

cargo add baichat-rs

Usage

extern crate baichat_rs;

use baichat_rs::ThebAI;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {

    let mut ai = ThebAI::new(None);
    
    let r = ai.ask("Hello, world!", None).await?;

    let response = r[r.len() - 1].text.clone();

    println!("{}", response);

    Ok(())
}

Dependencies

~10–26MB
~344K SLoC