From ed9aa135135687dc50f21ec31286c1c2dbd62acb Mon Sep 17 00:00:00 2001 From: Piotr Wilkin Date: Fri, 3 Apr 2026 12:50:24 +0200 Subject: [PATCH] Rename --- common/chat.cpp | 4 ++-- common/chat.h | 2 +- tools/parser/debug-template-parser.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/chat.cpp b/common/chat.cpp index f2a1e699d5..e93ee6b230 100644 --- a/common/chat.cpp +++ b/common/chat.cpp @@ -1631,7 +1631,7 @@ static json common_chat_extra_context() { return ctx; } -std::optional try_specialized_template( +std::optional common_chat_try_specialized_template( const common_chat_template & tmpl, const std::string & src, const autoparser::generation_params & params) { @@ -1778,7 +1778,7 @@ static common_chat_params common_chat_templates_apply_jinja(const struct common_ return data; } - if (auto result = try_specialized_template(tmpl, src, params)) { + if (auto result = common_chat_try_specialized_template(tmpl, src, params)) { result->generation_prompt = params.generation_prompt; return *result; } diff --git a/common/chat.h b/common/chat.h index 8febed7b2a..d5328379cc 100644 --- a/common/chat.h +++ b/common/chat.h @@ -271,7 +271,7 @@ std::string common_chat_template_direct_apply( const common_chat_template & tmpl, const autoparser::generation_params & inputs); -std::optional try_specialized_template( +std::optional common_chat_try_specialized_template( const common_chat_template & tmpl, const std::string & src, const autoparser::generation_params & params); diff --git a/tools/parser/debug-template-parser.cpp b/tools/parser/debug-template-parser.cpp index eedac5a661..9c591a1f11 100644 --- a/tools/parser/debug-template-parser.cpp +++ b/tools/parser/debug-template-parser.cpp @@ -392,7 +392,7 @@ int main(int argc, char ** argv) { autoparser::generation_params params = prepare_params(opts, tools); common_chat_params parser_data; if (std::optional spec_tmpl = - try_specialized_template(chat_template, template_source, params)) { + common_chat_try_specialized_template(chat_template, template_source, params)) { LOG_ERR("\n"); LOG_ERR("This template uses a specialized parser, analysis results will not be available."); parser_data = *spec_tmpl;