Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Frontend] Generate valid tool call IDs when using tokenizer-mode=mistral #12332

Merged
merged 19 commits into from
Feb 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix docstring quotes
Signed-off-by: Rafael Vasquez <rafvasq21@gmail.com>
  • Loading branch information
rafvasq committed Feb 4, 2025
commit b61a3912235f972c22cb22764efb935351dbba1c
2 changes: 1 addition & 1 deletion vllm/transformers_utils/tokenizers/mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def maybe_serialize_tool_calls(request: ChatCompletionRequest):


def truncate_tool_call_ids(request: ChatCompletionRequest):
'''Truncates tool call IDs to a length of 9 for Mistral's ID requirements'''
"""Truncates tool call IDs to a length of 9 for Mistral's ID requirements"""
for i, message in enumerate(request.messages):
if message.get("role") == 'assistant':
tool_calls = message.get("tool_calls", [])
Expand Down