From 9222713afccb8042ceb237cf6156606724279fb8 Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 11 Mar 2025 08:20:25 +0800 Subject: fix: miss tag while tool calling (#1226) --- src/client/openai.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/openai.rs b/src/client/openai.rs index ab12b1a..37ac895 100644 --- a/src/client/openai.rs +++ b/src/client/openai.rs @@ -153,6 +153,10 @@ pub async fn openai_chat_completions_streaming( .as_str() .filter(|v| !v.is_empty()), ) { + if reasoning_state == 1 { + handler.text("\n\n\n")?; + reasoning_state = 0; + } let maybe_call_id = format!("{}/{}", id.unwrap_or_default(), index.unwrap_or_default()); if maybe_call_id != call_id && maybe_call_id.len() >= call_id.len() { if !function_name.is_empty() { -- cgit v1.2.3