From b13c87802709d28715e70ab4bbae3ea069e667b2 Mon Sep 17 00:00:00 2001 From: 0xMRTT <0xMRTT@proton.me> Date: Sat, 17 Jun 2023 17:20:41 +0200 Subject: [PATCH] feat: add readme --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6151fe9 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Theb.ai / BAI Chat + +## Installation + +``` shell +cargo add baichat-rs +``` + +## Usage + +``` rust +extern crate baichat_rs; + +use baichat_rs::ThebAI; + +#[tokio::main] +async fn main() -> Result<(), Box> { + + 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(()) +} +``` \ No newline at end of file