From 69cd3450e4885fd05544b81e13e0648050af62f0 Mon Sep 17 00:00:00 2001 From: Damien Murphy Date: Sat, 13 Jul 2024 15:21:15 -0700 Subject: [PATCH] print entire response --- examples/make_prerecorded_request_builder.rs | 3 +-- examples/prerecorded_from_file/main.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/make_prerecorded_request_builder.rs b/examples/make_prerecorded_request_builder.rs index 53ceb260..7a3cfc55 100644 --- a/examples/make_prerecorded_request_builder.rs +++ b/examples/make_prerecorded_request_builder.rs @@ -38,8 +38,7 @@ async fn main() -> reqwest::Result<()> { // That way it knows what type to deserialize the JSON into let response: Response = customized_request_builder.send().await?.json().await?; - let transcript = &response.results.channels[0].alternatives[0].transcript; - println!("{}", transcript); + println!("{:?}", response); Ok(()) } diff --git a/examples/prerecorded_from_file/main.rs b/examples/prerecorded_from_file/main.rs index c80872c2..5bc5bf7b 100644 --- a/examples/prerecorded_from_file/main.rs +++ b/examples/prerecorded_from_file/main.rs @@ -32,8 +32,7 @@ async fn main() -> Result<(), DeepgramError> { .prerecorded(source, &options) .await?; - let transcript = &response.results.channels[0].alternatives[0].transcript; - println!("{}", transcript); + println!("{:?}", response); Ok(()) }