Fix: Improve test_openai_function_calling unit test and fix reasoning_parser.py think_start_token logic (#8316)
Co-authored-by: Chang Su <chang.s.su@oracle.com>
This commit is contained in:
@@ -493,9 +493,6 @@ class OpenAIServingChat(OpenAIServingBase):
|
||||
)
|
||||
yield f"data: {chunk.model_dump_json()}\n\n"
|
||||
|
||||
if not delta:
|
||||
continue
|
||||
|
||||
# Handle tool calls
|
||||
if request.tool_choice != "none" and request.tools:
|
||||
async for (
|
||||
|
||||
@@ -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.
|
||||
"""
|
||||
in_reasoning = self._in_reasoning or text.startswith(self.think_start_token)
|
||||
in_reasoning = self._in_reasoning or self.think_start_token in text
|
||||
|
||||
if not in_reasoning:
|
||||
return StreamingParseResult(normal_text=text)
|
||||
|
||||
Reference in New Issue
Block a user