[Bugfix]: Fix the logic for deciding if tool parsing is used (#8366)

This commit is contained in:
tomeras91
2024-09-12 06:55:30 +03:00
committed by GitHub
parent b6c75e1cf2
commit 5a60699c45

View File

@ -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):