From 7f6e7570db60bbe7f54bab0a93d9a8cfbc758972 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Mon, 2 Dec 2024 13:41:09 +0100 Subject: [PATCH] use "built-in" instead of "supported" --- include/llama.h | 4 ++-- src/llama.cpp | 2 +- tests/test-chat-template.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/llama.h b/include/llama.h index 7423748b7..439e0ff0c 100644 --- a/include/llama.h +++ b/include/llama.h @@ -990,8 +990,8 @@ extern "C" { char * buf, int32_t length); - // Get list of supported chat templates - int32_t llama_chat_supported_templates(const char ** output, size_t len); + // Get list of built-in chat templates + int32_t llama_chat_builtin_templates(const char ** output, size_t len); // // Sampling API diff --git a/src/llama.cpp b/src/llama.cpp index da2f828ef..6a6f4c2a5 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -22370,7 +22370,7 @@ int32_t llama_chat_apply_template( return res; } -int32_t llama_chat_supported_templates(const char ** output, size_t len) { +int32_t llama_chat_builtin_templates(const char ** output, size_t len) { auto it = LLM_CHAT_TEMPLATES.begin(); for (size_t i = 0; i < std::min(len, LLM_CHAT_TEMPLATES.size()); i++) { output[i] = it->first.c_str(); diff --git a/tests/test-chat-template.cpp b/tests/test-chat-template.cpp index 830ce730e..bc4a34856 100644 --- a/tests/test-chat-template.cpp +++ b/tests/test-chat-template.cpp @@ -135,10 +135,10 @@ int main(void) { // list all supported templates std::vector supported_tmpl(1024); - res = llama_chat_supported_templates(supported_tmpl.data(), supported_tmpl.size()); + res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size()); assert(res > 0); supported_tmpl.resize(res); - printf("Supported templates:\n"); + printf("Built-in chat templates:\n"); for (auto tmpl : supported_tmpl) { printf(" %s\n", tmpl); }