fix: last

This commit is contained in:
2023-06-17 17:15:56 +02:00
parent ba9054352e
commit a428366f8e

View File

@@ -10,7 +10,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let r = ai.ask("Hello, world!", None).await?;
let response = r.last()?.text.clone();
let response = r[r.len() - 1].text.clone();
println!("{:?}", response);