From 6875c1ad5507305d4ac134b2d397503848e55344 Mon Sep 17 00:00:00 2001 From: 0xMRTT <0xMRTT@proton.me> Date: Sat, 17 Jun 2023 17:10:26 +0200 Subject: [PATCH] feat: use new syntax --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 72b8d07..a7de592 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,14 @@ extern crate baichat_rs; -use baichat_rs::ask; +use baichat_rs::ThebAI; #[tokio::main] async fn main() -> Result<(), Box> { - let mut response = ask("Hello, world!").await?; + let mut ai = ThebAI::new(None); + + + let mut response = ai.ask("Hello, world!").await?; println!("{:?}", response);