File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
lib/llm/src/protocols/openai/chat_completions Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ impl DeltaAggregator {
165165
166166 // After aggregation, inspect each choice's text for tool call syntax
167167 for choice in aggregator. choices . values_mut ( ) {
168- if choice. tool_calls . is_none ( ) {
169- if let Ok ( tool_calls) = try_tool_call_parse_aggregate (
168+ if choice. tool_calls . is_none ( )
169+ && let Ok ( tool_calls) = try_tool_call_parse_aggregate (
170170 & choice. text ,
171171 parsing_options. tool_call_parser . as_deref ( ) ,
172172 ) {
@@ -186,7 +186,6 @@ impl DeltaAggregator {
186186 choice. finish_reason =
187187 Some ( dynamo_async_openai:: types:: FinishReason :: ToolCalls ) ;
188188 }
189- }
190189 }
191190
192191 // Extract aggregated choices and sort them by index.
You can’t perform that action at this time.
0 commit comments