fix: last

This commit is contained in:
0xMRTT 2023-06-17 17:15:56 +02:00
parent ba9054352e
commit a428366f8e
Signed by: 0xMRTT
GPG Key ID: 910B287304120902

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);