server: validate "--chat-template" argument
This commit is contained in:
parent
7efef47d2e
commit
ebe3079539
1 changed files with 7 additions and 1 deletions
|
@ -2300,7 +2300,13 @@ static void server_params_parse(int argc, char **argv, server_params &sparams,
|
||||||
invalid_param = true;
|
invalid_param = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sparams.chat_template = argv[i];
|
std::string value(argv[i]);
|
||||||
|
if (value != "chatml" && value != "llama2") {
|
||||||
|
fprintf(stderr, "error: chat template can be \"llama2\" or \"chatml\", but got: %s\n", value.c_str());
|
||||||
|
invalid_param = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sparams.chat_template = value;
|
||||||
}
|
}
|
||||||
else if (arg == "--override-kv")
|
else if (arg == "--override-kv")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue