File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ common_chat_templates_ptr common_chat_templates_init(
411411 token_bos = get_token (llama_vocab_bos (vocab), " BOS" , " bos_token" );
412412 token_eos = get_token (llama_vocab_eos (vocab), " EOS" , " eos_token" );
413413 }
414- auto * tmpls = new common_chat_templates ();
414+ common_chat_templates_ptr tmpls ( new common_chat_templates (), common_chat_templates_free );
415415 tmpls->has_explicit_template = has_explicit_template;
416416 try {
417417 tmpls->template_default = std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos);
@@ -426,7 +426,7 @@ common_chat_templates_ptr common_chat_templates_init(
426426 LOG_ERR (" %s: failed to parse tool use chat template (ignoring it): %s\n " , __func__, e.what ());
427427 }
428428 }
429- return { tmpls, common_chat_templates_free} ;
429+ return tmpls;
430430}
431431
432432std::string common_chat_format_name (common_chat_format format) {
You can’t perform that action at this time.
0 commit comments