Skip to content

Commit 84c6f34

Browse files
Ubuntugjgjos
authored andcommitted
[Feature] Add Command Tool Parser
Signed-off-by: Doil Kim <[email protected]> Co-authored-by: 김종곤 <[email protected]>
1 parent 8dc9555 commit 84c6f34

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

vllm/entrypoints/openai/tool_parsers/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33

44
from .abstract_tool_parser import ToolParser, ToolParserManager
5-
from .command_tool_parser import CommandJsonToolParser
5+
from .command_tool_parser import CommandToolParser
66
from .deepseekv3_tool_parser import DeepSeekV3ToolParser
77
from .granite_20b_fc_tool_parser import Granite20bFCToolParser
88
from .granite_tool_parser import GraniteToolParser
@@ -23,5 +23,5 @@
2323
"Internlm2ToolParser", "Llama3JsonToolParser", "JambaToolParser",
2424
"Llama4PythonicToolParser", "PythonicToolParser", "Phi4MiniJsonToolParser",
2525
"DeepSeekV3ToolParser", "xLAMToolParser", "MinimaxToolParser",
26-
"CommandJsonToolParser"
26+
"CommandToolParser"
2727
]

vllm/entrypoints/openai/tool_parsers/command_tool_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
logger = init_logger(__name__)
2424

2525

26-
@ToolParserManager.register_module("command_json")
27-
class CommandJsonToolParser(ToolParser):
26+
@ToolParserManager.register_module("command")
27+
class CommandToolParser(ToolParser):
2828

2929
def __init__(self, tokenizer: PreTrainedTokenizerBase):
3030
super().__init__(tokenizer)
@@ -47,7 +47,7 @@ def __init__(self, tokenizer: PreTrainedTokenizerBase):
4747
if (self.tool_call_start_token_id is None
4848
or self.tool_call_end_token_id is None):
4949
raise RuntimeError(
50-
"CommandJsonToolParser cannot find start/end tokens in vocab")
50+
"CommandToolParser cannot find start/end tokens in vocab")
5151

5252
def extract_tool_calls(
5353
self, model_output: str,

0 commit comments

Comments
 (0)