server: only check model template if there is no custom tmpl

This commit is contained in:
ngxson 2024-02-21 17:41:04 +01:00
parent 10d86733f3
commit 2ab9cb96ed

View file

@ -2723,8 +2723,10 @@ int main(int argc, char **argv)
LOG_INFO("model loaded", {});
}
if (sparams.chat_template.empty()) { // custom chat template is not supplied
// check if the template comes with the model is supported by us
llama.validate_model_chat_template(sparams);
}
// Middleware for API key validation
auto validate_api_key = [&sparams](const httplib::Request &req, httplib::Response &res) -> bool {