feat: use new syntax
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user