1 个不稳定版本
0.1.0 | 2023年6月17日 |
---|
#575 在 机器学习
12KB
102 行
Theb.ai / BAI Chat
安装
cargo add baichat-rs
使用
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(())
}
依赖
~10–23MB
~350K SLoC