From 5a60699c452c0b9b8086a978d8572c257c2c3cc4 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 a81d2aa9..8ac4caff 100644 --- a/vllm/entrypoints/openai/serving_chat.py +++ b/vllm/entrypoints/openai/serving_chat.py @@ -607,7 +607,7 @@ class OpenAIServingChat(OpenAIServing): # 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):