From 0f9e8cfcdd84620488ff4bc5a52b02717cc5359f Mon Sep 17 00:00:00 2001 From: Clayton <132770471+cedonley@users.noreply.github.com> Date: Sat, 7 Dec 2024 08:30:57 -0800 Subject: [PATCH] Update vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py Co-authored-by: Guillaume Calmettes Signed-off-by: cedonley --- vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py index 1738edcaf7f15..bada805dd35b9 100644 --- a/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py @@ -232,7 +232,7 @@ def extract_tool_calls_streaming( delta = DeltaMessage(tool_calls=[ DeltaToolCall(index=self.current_tool_id, type="function", - id="".join(choices(ALPHANUMERIC, k=9)), + id=MistralToolCall.generate_random_id(), function=DeltaFunctionCall( name=function_name).model_dump( exclude_none=True))