From 1396d33d683fc37a1e790a688d47f64e99b6d2ed Mon Sep 17 00:00:00 2001 From: Guillaume Calmettes Date: Wed, 2 Oct 2024 13:02:32 +0200 Subject: [PATCH] feat: use Mistral Tool Call when using Mistral tool parser --- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py index 4b0e1c91df97c..df953c5d2d78f 100644 --- a/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py @@ -8,7 +8,7 @@ from vllm.entrypoints.openai.protocol import (DeltaFunctionCall, DeltaMessage, DeltaToolCall, ExtractedToolCallInformation, - FunctionCall, ToolCall) + FunctionCall, MistralToolCall) from vllm.entrypoints.openai.tool_parsers.abstract_tool_parser import ( ToolParser) from vllm.entrypoints.openai.tool_parsers.utils import ( @@ -71,8 +71,8 @@ def extract_tool_calls(self, # load the JSON, and then use it to build the Function and # Tool Call function_call_arr = json.loads(raw_tool_call) - tool_calls: List[ToolCall] = [ - ToolCall( + tool_calls: List[MistralToolCall] = [ + MistralToolCall( type="function", function=FunctionCall( name=raw_function_call["name"],