mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-02 08:04:33 +08:00
[Frontend] early return chat format resolution when specified (#19735)
This commit is contained in:
parent
ead2110297
commit
ea10dd9d9e
@ -448,6 +448,9 @@ def resolve_chat_template_content_format(
|
|||||||
model_config: ModelConfig,
|
model_config: ModelConfig,
|
||||||
trust_remote_code: Optional[bool] = None,
|
trust_remote_code: Optional[bool] = None,
|
||||||
) -> _ChatTemplateContentFormat:
|
) -> _ChatTemplateContentFormat:
|
||||||
|
if given_format != "auto":
|
||||||
|
return given_format
|
||||||
|
|
||||||
detected_format = _resolve_chat_template_content_format(
|
detected_format = _resolve_chat_template_content_format(
|
||||||
chat_template,
|
chat_template,
|
||||||
tools,
|
tools,
|
||||||
@ -461,7 +464,7 @@ def resolve_chat_template_content_format(
|
|||||||
detected_format=detected_format,
|
detected_format=detected_format,
|
||||||
)
|
)
|
||||||
|
|
||||||
return detected_format if given_format == "auto" else given_format
|
return detected_format
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user