mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-16 00:28:10 +08:00
fix webui
Former-commit-id: aa6e65b24451fe9f65d58e5eca5a56eb9aba71e8
This commit is contained in:
parent
0118a2fc04
commit
ae6ad55758
@ -137,8 +137,13 @@ def get_template(model_name: str) -> str:
|
|||||||
r"""
|
r"""
|
||||||
Gets the template name if the model is a chat model.
|
Gets the template name if the model is a chat model.
|
||||||
"""
|
"""
|
||||||
if model_name and model_name.endswith("Chat") and get_prefix(model_name) in DEFAULT_TEMPLATE:
|
if (
|
||||||
|
model_name
|
||||||
|
and any(suffix in model_name for suffix in ("-Chat", "-Instruct"))
|
||||||
|
and get_prefix(model_name) in DEFAULT_TEMPLATE
|
||||||
|
):
|
||||||
return DEFAULT_TEMPLATE[get_prefix(model_name)]
|
return DEFAULT_TEMPLATE[get_prefix(model_name)]
|
||||||
|
|
||||||
return "default"
|
return "default"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user