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
43813e63
Unverified
Commit
43813e63
authored
Jul 06, 2025
by
Reid
Committed by
GitHub
Jul 06, 2025
Browse files
[Misc] call the pre-defined func (#20518)
Signed-off-by:
reidliu41
<
reid201711@gmail.com
>
parent
cede942b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py
...entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py
+2
-2
vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py
vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py
+2
-1
No files found.
vllm/entrypoints/openai/tool_parsers/deepseekv3_tool_parser.py
View file @
43813e63
...
...
@@ -6,6 +6,7 @@ from typing import Union
import
regex
as
re
from
vllm.entrypoints.chat_utils
import
random_tool_call_id
from
vllm.entrypoints.openai.protocol
import
(
ChatCompletionRequest
,
DeltaFunctionCall
,
DeltaMessage
,
DeltaToolCall
,
...
...
@@ -15,7 +16,6 @@ from vllm.entrypoints.openai.tool_parsers.abstract_tool_parser import (
ToolParser
,
ToolParserManager
)
from
vllm.logger
import
init_logger
from
vllm.transformers_utils.tokenizer
import
AnyTokenizer
from
vllm.utils
import
random_uuid
logger
=
init_logger
(
__name__
)
...
...
@@ -267,7 +267,7 @@ class DeepSeekV3ToolParser(ToolParser):
DeltaToolCall
(
index
=
self
.
current_tool_id
,
type
=
"function"
,
id
=
f
"chatcmpl-tool-
{
random_uu
id
()
}
"
,
id
=
random_tool_call_
id
(),
function
=
DeltaFunctionCall
(
name
=
function_name
).
model_dump
(
exclude_none
=
True
),
...
...
vllm/entrypoints/openai/tool_parsers/xlam_tool_parser.py
View file @
43813e63
...
...
@@ -7,6 +7,7 @@ from typing import Any, Optional, Union
import
regex
as
re
from
vllm.entrypoints.chat_utils
import
random_tool_call_id
from
vllm.entrypoints.openai.protocol
import
(
ChatCompletionRequest
,
DeltaFunctionCall
,
DeltaMessage
,
DeltaToolCall
,
...
...
@@ -225,7 +226,7 @@ class xLAMToolParser(ToolParser):
function_name
=
name_match
.
group
(
1
)
# The test expects us to send just the name first
tool_id
=
f
"chatcmpl-tool-
{
random_uu
id
()
}
"
tool_id
=
random_tool_call_
id
()
delta
=
DeltaMessage
(
tool_calls
=
[
DeltaToolCall
(
index
=
0
,
...
...
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