[Renderer] Move InputPreprocessor into Renderer (1.5/2) (#34598)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-02-15 23:46:33 -08:00
committed by GitHub
parent bb59c90248
commit ec17bdd894
11 changed files with 209 additions and 136 deletions
+2 -2
View File
@@ -93,14 +93,14 @@ def _build_renderer(
def _preprocess_prompt(
mdoel_config: ModelConfig,
model_config: ModelConfig,
prompt_or_prompts: SingletonPrompt | bytes | Sequence[SingletonPrompt | bytes],
):
return [
(
prompt
if isinstance(prompt, bytes)
else parse_model_prompt(mdoel_config, prompt)
else parse_model_prompt(model_config, prompt)
)
for prompt in prompt_to_seq(prompt_or_prompts)
]