feat: use new syntax

This commit is contained in:
2023-06-17 17:10:26 +02:00
parent 32ee2aa63a
commit 6875c1ad55

View File

@@ -1,11 +1,14 @@
extern crate baichat_rs;
use baichat_rs::ask;
use baichat_rs::ThebAI;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut response = ask("Hello, world!").await?;
let mut ai = ThebAI::new(None);
let mut response = ai.ask("Hello, world!").await?;
println!("{:?}", response);