Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"reasoning_content": "This is a reasoning section",
"content": None,
}
NO_REASONING = {
NO_CONTENT = {
"output": "This is content",
"reasoning_content": None,
"content": "This is content",
"reasoning_content": "This is content",
"content": None,
}
NO_REASONING_STREAMING = {
"output": "This is a reasoning section",
Expand Down Expand Up @@ -98,8 +98,8 @@
),
pytest.param(
False,
NO_REASONING,
id="no_reasoning_token",
NO_CONTENT,
id="no_content_token",
),
pytest.param(
True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def extract_reasoning_content(
# Thus we assume the reasoning content is always at the start.
# Ref https://huggingface.co/deepseek-ai/DeepSeek-R1/commit/8a58a132790c9935686eb97f042afa8013451c9f
if self.think_end_token not in model_output:
return None, model_output
return model_output, None
else:
# Add a start token if it's missing to keep compatibility.
if self.think_start_token not in model_output:
Expand Down