From 7ed6c5e000a8cb76fd8aa052e3486830dc8e70db Mon Sep 17 00:00:00 2001 From: Jeffrey Tang Date: Fri, 23 Feb 2024 17:04:19 -0600 Subject: [PATCH] more prints --- router/src/server.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/router/src/server.rs b/router/src/server.rs index c8ae73f1c..832d38e45 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -117,7 +117,12 @@ async fn completions_v1( let req = req.0; let mut gen_req = CompatGenerateRequest::from(req); - let _ = headers.get("Authorization").map_or((), |x| { + println!("!!! HEADERS !!!"); + for (k, v) in &headers { + println!("{0}: {1}", k.as_str(), v.to_str().unwrap_or("N/A")); + } + + let _ = headers.get("authorization").map_or((), |x| { x.to_str().map_or((), |y| { y.strip_prefix("Bearer :").map_or((), |token| { println!("token!! {token}"); @@ -187,7 +192,12 @@ async fn chat_completions_v1( let req = req.0; let mut gen_req = CompatGenerateRequest::from(req); - headers.get("Authorization").map_or((), |x| { + println!("!!! HEADERS !!!"); + for (k, v) in &headers { + println!("{0}: {1}", k.as_str(), v.to_str().unwrap_or("N/A")); + } + + let _ = headers.get("Authorization").map_or((), |x| { x.to_str().map_or((), |y| { y.strip_prefix("Bearer :").map_or((), |token| { println!("token!! {token}");