Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
959783fb
Unverified
Commit
959783fb
authored
Aug 26, 2025
by
Bin Jia
Committed by
GitHub
Aug 25, 2025
Browse files
[fix] fix seed-oss-parser (#23560)
Signed-off-by:
jiabin.00
<
jiabin.00@bytedance.com
>
parent
ce0e9dbd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
tests/tool_use/test_seed_oss_tool_parser.py
tests/tool_use/test_seed_oss_tool_parser.py
+2
-7
vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py
vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py
+3
-0
No files found.
tests/tool_use/test_seed_oss_tool_parser.py
View file @
959783fb
...
@@ -102,9 +102,7 @@ def test_extract_tool_calls_no_tools(seed_oss_tool_parser):
...
@@ -102,9 +102,7 @@ def test_extract_tool_calls_no_tools(seed_oss_tool_parser):
],
],
argnames
=
[
"model_output"
,
"expected_tool_calls"
,
"expected_content"
],
argnames
=
[
"model_output"
,
"expected_tool_calls"
,
"expected_content"
],
argvalues
=
[
argvalues
=
[
(
"""<seed:think>
\n
</seed:cot_budget_reflect>
\n
</seed:cot_budget_reflect>
\n
"""
(
"""<seed:tool_call>
\n
<function=get_weather>
\n
"""
"""The current thinking budget is 0, so I will directly start answering the question.
\n
</seed:think>
\n
"""
"""<seed:tool_call>
\n
<function=get_weather>
\n
"""
"""<parameter=location>Barcelona, Spain</parameter>
\n
</function>
\n
</seed:tool_call>"""
,
"""<parameter=location>Barcelona, Spain</parameter>
\n
</function>
\n
</seed:tool_call>"""
,
[
[
ToolCall
(
function
=
FunctionCall
(
ToolCall
(
function
=
FunctionCall
(
...
@@ -114,10 +112,7 @@ def test_extract_tool_calls_no_tools(seed_oss_tool_parser):
...
@@ -114,10 +112,7 @@ def test_extract_tool_calls_no_tools(seed_oss_tool_parser):
},
),
},
),
),
),
type
=
'function'
)
type
=
'function'
)
],
],
None
),
"""<seed:think>
\n
</seed:cot_budget_reflect>
\n
</seed:cot_budget_reflect>
\n
"""
"""The current thinking budget is 0, so I will directly start answering the question.
\n
</seed:think>
\n
"""
),
(
(
"""<seed:think>The user
\'
s current thinking budget is 512.</seed:cot_budget_reflect>
\n
Let me analyze the """
"""<seed:think>The user
\'
s current thinking budget is 512.</seed:cot_budget_reflect>
\n
Let me analyze the """
"""question. The user wants to know the weather in Barcelona, Spain. Looking at the functions available, """
"""question. The user wants to know the weather in Barcelona, Spain. Looking at the functions available, """
...
...
vllm/entrypoints/openai/tool_parsers/seed_oss_tool_parser.py
View file @
959783fb
...
@@ -271,6 +271,9 @@ class SeedOssToolParser(ToolParser):
...
@@ -271,6 +271,9 @@ class SeedOssToolParser(ToolParser):
# Extract content after think end token
# Extract content after think end token
result_content
=
model_output
[
think_end_index
:]
result_content
=
model_output
[
think_end_index
:]
thinking_content
=
model_output
[:
think_end_index
]
thinking_content
=
model_output
[:
think_end_index
]
else
:
thinking_content
=
""
result_content
=
model_output
try
:
try
:
function_calls
=
self
.
_get_function_calls
(
result_content
)
function_calls
=
self
.
_get_function_calls
(
result_content
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment