[API] Add token offsets to render endpoints (/v1/.../render) (#44226)

Signed-off-by: HyunKyun Moon <mhg5303@gmail.com>
This commit is contained in:
Hyunkyun Moon
2026-06-26 05:02:52 -07:00
committed by GitHub
parent d980a3cc6e
commit 950ee4c2e4
13 changed files with 518 additions and 22 deletions
+5
View File
@@ -167,6 +167,11 @@ class TokenizeParams:
add_special_tokens: bool = True
"""Whether to add special tokens."""
return_token_offsets: bool = False
"""If true, request char-level (start, end) offsets per token. Honored
only for Fast (Rust-backed) tokenizers with text input and no multimodal
data; otherwise silently ignored."""
needs_detokenization: bool = False
"""
Whether the tokenized prompt needs to contain the original text.