From 66e59b01557cfc0f4305c97034519d78269ecbd5 Mon Sep 17 00:00:00 2001 From: Valentin Mamedov Date: Sun, 15 Dec 2024 13:37:12 +0700 Subject: [PATCH] lint llama.cpp --- src/llama.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/llama.cpp b/src/llama.cpp index 45fc03f02..c35ba3978 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -22124,14 +22124,14 @@ static int32_t llama_chat_apply_template_internal( } else if (tmpl == LLM_CHAT_TEMPLATE_GIGACHAT) { // GigaChat template bool has_system = !chat.empty() && std::string(chat[0]->role) == "system"; - + // Handle system message if present if (has_system) { ss << "" << chat[0]->content << "<|message_sep|>"; } else { ss << ""; } - + // Process remaining messages for (size_t i = has_system ? 1 : 0; i < chat.size(); i++) { std::string role(chat[i]->role); @@ -22142,7 +22142,7 @@ static int32_t llama_chat_apply_template_internal( ss << "assistant<|role_sep|>" << chat[i]->content << "<|message_sep|>"; } } - + // Add generation prompt if needed if (add_ass) { ss << "assistant<|role_sep|>";