Skip to content

Commit c46a8c8

Browse files
committed
[Refactor] to simplify and extract the shared logic between chat completion and responses
Signed-off-by: chaunceyjiang <[email protected]>
1 parent 15d0492 commit c46a8c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vllm/entrypoints/openai/serving_engine.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,8 @@ def _parse_tool_calls_from_content(
13561356
)
13571357
content = None # Clear content since tool is called.
13581358
elif request.tool_choice == "auto" or request.tool_choice == "none":
1359+
assert tool_parser_cls is not None
1360+
# Automatic Tool Call Parsing
13591361
try:
13601362
tool_parser = tool_parser_cls(tokenizer)
13611363
except RuntimeError as e:

0 commit comments

Comments
 (0)