fix: resolve chat template names before kwargs detection (#36937)
Co-authored-by: giulio-leone <giulio.leone@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
giulio-leone
Copilot
parent
367cf5cd3e
commit
b41aa264f9
@@ -108,7 +108,9 @@ def resolve_chat_template(
|
||||
) -> str | None:
|
||||
# 1st priority: The given chat template
|
||||
if chat_template is not None:
|
||||
return chat_template
|
||||
# Resolve template names (e.g. "tool_use") to actual Jinja content
|
||||
# so that downstream kwargs detection can parse template variables.
|
||||
return tokenizer.get_chat_template(chat_template, tools=tools)
|
||||
|
||||
# 2nd priority: AutoProcessor chat template, unless tool calling is enabled
|
||||
if tools is None:
|
||||
|
||||
Reference in New Issue
Block a user