[Frontend] early return chat format resolution when specified (#19735)
This commit is contained in:
@ -448,6 +448,9 @@ def resolve_chat_template_content_format(
|
||||
model_config: ModelConfig,
|
||||
trust_remote_code: Optional[bool] = None,
|
||||
) -> _ChatTemplateContentFormat:
|
||||
if given_format != "auto":
|
||||
return given_format
|
||||
|
||||
detected_format = _resolve_chat_template_content_format(
|
||||
chat_template,
|
||||
tools,
|
||||
@ -461,7 +464,7 @@ def resolve_chat_template_content_format(
|
||||
detected_format=detected_format,
|
||||
)
|
||||
|
||||
return detected_format if given_format == "auto" else given_format
|
||||
return detected_format
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user