Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 5 additions & 2 deletions vllm/tokenizers/kimi_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import contextlib
import json
from collections.abc import Sequence
from pathlib import Path
from typing import Any, overload

Expand Down Expand Up @@ -299,7 +300,9 @@ def encode(
tokens = self._maybe_truncate(tokens, max_length)
return tokens

def decode(self, ids: list[int] | int, skip_special_tokens: bool = False) -> str:
def decode(
self, ids: Sequence[int] | int, skip_special_tokens: bool = False
) -> str:
"""Decode token IDs to text, optionally skipping special tokens."""
if isinstance(ids, int):
ids = [ids]
Expand All @@ -321,7 +324,7 @@ def convert_tokens_to_ids(self, tokens: str | list[str]) -> int | list[int]:
return [self._token_to_id.get(token, self._unk_token_id) for token in tokens]

def convert_ids_to_tokens(
self, ids: list[int], skip_special_tokens: bool = False
self, ids: Sequence[int], skip_special_tokens: bool = False
) -> list[str]:
tokens = []
for token_id in ids:
Expand Down
2 changes: 1 addition & 1 deletion vllm/tool_parsers/abstract_tool_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def adjust_request(self, request: ChatCompletionRequest) -> ChatCompletionReques
# tool_choice: "Forced Function" or "required" will override
# structured output json settings to make tool calling work correctly
request.structured_outputs = StructuredOutputsParams(
json=json_schema_from_tool
json=json_schema_from_tool # type: ignore[call-arg]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see this sneaking in, it annoyed me too. :)

)
request.response_format = None
if isinstance(request, ResponsesRequest):
Expand Down
Loading