From c19359ef79c635adbef92159ba2b4171c1ad50b3 Mon Sep 17 00:00:00 2001 From: tomeras91 <57313761+tomeras91@users.noreply.github.com> Date: Thu, 12 Sep 2024 06:55:30 +0300 Subject: [PATCH] [Bugfix]: Fix the logic for deciding if tool parsing is used (#8366) --- vllm/entrypoints/openai/serving_chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/entrypoints/openai/serving_chat.py b/vllm/entrypoints/openai/serving_chat.py index a81d2aa989aaf..8ac4caffb37f0 100644 --- a/vllm/entrypoints/openai/serving_chat.py +++ b/vllm/entrypoints/openai/serving_chat.py @@ -607,7 +607,7 @@ async def chat_completion_full_generator( # if auto tools are not enabled, and a named tool choice using # outlines is not being used - if not (self.enable_auto_tools + if (not self.enable_auto_tools or not self.tool_parser) and not isinstance( request.tool_choice, ChatCompletionNamedToolChoiceParam):