[Perf] Improved perf for resolve_chat_template_content_format (#20065)

Signed-off-by: Ilya Lavrenov <ilya.lavrenov@cerebras.net>
This commit is contained in:
Ilya Lavrenov 2025-06-27 13:16:41 +04:00 committed by GitHub
parent 4ab3ac285e
commit aa0dc77ef5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -293,6 +293,7 @@ def _try_extract_ast(chat_template: str) -> Optional[jinja2.nodes.Template]:
return None
@lru_cache(maxsize=32)
def _detect_content_format(
chat_template: str,
*,