Skip to content

Commit 1e0e951

Browse files
committed
Fix print header
1 parent ddeefd2 commit 1e0e951

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/chat_completion.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2121

2222
let result = client.chat_completion(req).await?;
2323
println!("Content: {:?}", result.choices[0].message.content);
24-
println!("Response Headers: {:?}", client.headers);
24+
25+
// print response headers
26+
for (key, value) in client.headers.unwrap().iter() {
27+
println!("{}: {:?}", key, value);
28+
}
2529

2630
Ok(())
2731
}

0 commit comments

Comments
 (0)