Revert "feat: add thinking_budget (#6089)" (#6181)

This commit is contained in:
Yineng Zhang
2025-05-10 16:07:45 -07:00
committed by GitHub
parent 921e4a8185
commit 66fc63d6b1
9 changed files with 5 additions and 196 deletions

View File

@@ -32,7 +32,7 @@ class BaseReasoningFormatDetector:
One-time parsing: Detects and parses reasoning sections in the provided text.
Returns both reasoning content and normal text separately.
"""
text = text.replace(self.think_start_token, "")
text = text.replace(self.think_start_token, "").strip()
if self.think_end_token not in text:
# Assume reasoning was truncated before `</think>` token
return StreamingParseResult(reasoning_text=text)
@@ -73,7 +73,7 @@ class BaseReasoningFormatDetector:
normal_text = current_text[end_idx + len(self.think_end_token) :]
return StreamingParseResult(
normal_text=normal_text, reasoning_text=reasoning_text
normal_text=normal_text, reasoning_text=reasoning_text.rstrip()
)
# Continue with reasoning content