Skip to content

Commit f72ad46

Browse files
committed
fix
Signed-off-by: okada <kokuzen@gmail.com>
1 parent 4fe2231 commit f72ad46

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

vllm/entrypoints/openai/serving_chat.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,9 @@ async def create_chat_completion(
179179
"--enable-auto-tool-choice and --tool-call-parser to be set"
180180
)
181181

182-
if request.tools is None:
183-
tool_dicts = None
184-
elif (request.tool_choice == "none"
185-
and self.exclude_tools_when_tool_choice_none):
182+
if (request.tools is None or
183+
(request.tool_choice == "none" and
184+
self.exclude_tools_when_tool_choice_none)):
186185
tool_dicts = None
187186
else:
188187
tool_dicts = [tool.model_dump() for tool in request.tools]

0 commit comments

Comments
 (0)