Skip to content

Commit cc166b6

Browse files
committed
But I already did this!
1 parent 07e2055 commit cc166b6

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

lib/llm/src/protocols/openai/chat_completions/aggregator.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,23 @@ impl DeltaAggregator {
169169
&& let Ok(tool_calls) = try_tool_call_parse_aggregate(
170170
&choice.text,
171171
parsing_options.tool_call_parser.as_deref(),
172-
) {
173-
if tool_calls.is_empty() {
174-
continue;
175-
}
176-
for tool_call in &tool_calls {
177-
tracing::debug!(
178-
tool_call_id = %tool_call.id,
179-
function_name = %tool_call.function.name,
180-
arguments = %tool_call.function.arguments,
181-
"Parsed structured tool call from aggregated content"
182-
);
183-
}
184-
choice.tool_calls = Some(tool_calls);
185-
choice.text.clear();
186-
choice.finish_reason =
187-
Some(dynamo_async_openai::types::FinishReason::ToolCalls);
172+
)
173+
{
174+
if tool_calls.is_empty() {
175+
continue;
176+
}
177+
for tool_call in &tool_calls {
178+
tracing::debug!(
179+
tool_call_id = %tool_call.id,
180+
function_name = %tool_call.function.name,
181+
arguments = %tool_call.function.arguments,
182+
"Parsed structured tool call from aggregated content"
183+
);
188184
}
185+
choice.tool_calls = Some(tool_calls);
186+
choice.text.clear();
187+
choice.finish_reason = Some(dynamo_async_openai::types::FinishReason::ToolCalls);
188+
}
189189
}
190190

191191
// Extract aggregated choices and sort them by index.

0 commit comments

Comments
 (0)