From ba9054352e4396cb1c11362012cc446bdd08d2c1 Mon Sep 17 00:00:00 2001 From: 0xMRTT <0xMRTT@proton.me> Date: Sat, 17 Jun 2023 17:15:12 +0200 Subject: [PATCH] fix: add error --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1cbef76..431b470 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ async fn main() -> Result<(), Box> { let r = ai.ask("Hello, world!", None).await?; - let response = r.last().text.clone(); + let response = r.last()?.text.clone(); println!("{:?}", response);