[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
@@ -79,6 +79,11 @@ class DummyTokenizer:
return list(range(in_length))
def __call__(self, text: str, **kwargs):
# BaseRenderer._tokenize_prompt calls the tokenizer via __call__ (to
# unify the output type), so mirror a real tokenizer's BatchEncoding.
return {"input_ids": self.encode(text, **kwargs)}
def _build_renderer(
model_config: MockModelConfig,