baichat-rs

Crates.iobaichat-rs
lib.rsbaichat-rs
version0.1.0
sourcesrc
created_at2023-06-17 15:25:52.385623
updated_at2023-06-17 15:25:52.385623
descriptionBAI Chat/ThebAI in Rust
homepagehttps://bavarder.codeberg.page/code/baichat_rs/
repositoryhttps://codeberg.org/Bavarder/baichat-rs
max_upload_size
id892978
size43,166
0xMRTT (0xMRTT)

documentation

README

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(())
}
Commit count: 0

cargo fmt