feat: use new syntax
This commit is contained in:
parent
32ee2aa63a
commit
6875c1ad55
@ -1,11 +1,14 @@
|
|||||||
extern crate baichat_rs;
|
extern crate baichat_rs;
|
||||||
|
|
||||||
use baichat_rs::ask;
|
use baichat_rs::ThebAI;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
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);
|
println!("{:?}", response);
|
||||||
|
Loading…
Reference in New Issue
Block a user