File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed
protocols/openai/chat_completions Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -546,19 +546,20 @@ async fn chat_completions(
546546 process_metrics_only ( response, & mut response_collector) ;
547547 } ) ;
548548
549- let response = NvCreateChatCompletionResponse :: from_annotated_stream ( stream, tool_parser_name)
550- . await
551- . map_err ( |e| {
552- tracing:: error!(
553- request_id,
554- "Failed to fold chat completions stream for: {:?}" ,
555- e
556- ) ;
557- ErrorMessage :: internal_server_error ( & format ! (
558- "Failed to fold chat completions stream: {}" ,
559- e
560- ) )
561- } ) ?;
549+ let response =
550+ NvCreateChatCompletionResponse :: from_annotated_stream ( stream, tool_parser_name)
551+ . await
552+ . map_err ( |e| {
553+ tracing:: error!(
554+ request_id,
555+ "Failed to fold chat completions stream for: {:?}" ,
556+ e
557+ ) ;
558+ ErrorMessage :: internal_server_error ( & format ! (
559+ "Failed to fold chat completions stream: {}" ,
560+ e
561+ ) )
562+ } ) ?;
562563
563564 inflight_guard. mark_ok ( ) ;
564565 Ok ( Json ( response) . into_response ( ) )
Original file line number Diff line number Diff line change @@ -165,7 +165,9 @@ impl DeltaAggregator {
165165 // After aggregation, inspect each choice's text for tool call syntax
166166 for choice in aggregator. choices . values_mut ( ) {
167167 if choice. tool_calls . is_none ( ) {
168- if let Ok ( tool_calls) = try_tool_call_parse_aggregate ( & choice. text , tool_parser_name. as_deref ( ) ) {
168+ if let Ok ( tool_calls) =
169+ try_tool_call_parse_aggregate ( & choice. text , tool_parser_name. as_deref ( ) )
170+ {
169171 if tool_calls. is_empty ( ) {
170172 continue ;
171173 }
You can’t perform that action at this time.
0 commit comments