From 4232ec1fb9a24d4696b6faa4386e4728a9bd99ab Mon Sep 17 00:00:00 2001 From: HanishKVC Date: Sun, 12 May 2024 14:53:37 +0530 Subject: [PATCH] Main: Load json meta file only if specified This should be ok, given that there is a version of the chat tmpl meta data already included with the library. So only if user wants to change the chat template info wrt a existing model/template-standard or add a new one, then there is need to pass a json file with info for that model/standard. --- examples/main/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 591d83b35..a600d16b5 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -143,7 +143,9 @@ int main(int argc, char ** argv) { atexit([]() { console::cleanup(); }); if (params.chaton) { - chaton_meta_load(params.chaton_meta_json); + if (!params.chaton_meta_json.empty()) { + chaton_meta_load(params.chaton_meta_json); + } if (!chaton_meta_ok(params.chaton_template_id)) { exit(1); }