File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -22124,14 +22124,14 @@ static int32_t llama_chat_apply_template_internal(
2212422124    } else if (tmpl == LLM_CHAT_TEMPLATE_GIGACHAT) {
2212522125        // GigaChat template
2212622126        bool has_system = !chat.empty() && std::string(chat[0]->role) == "system";
22127-          
22127+ 
2212822128        // Handle system message if present
2212922129        if (has_system) {
2213022130            ss << "<s>" << chat[0]->content << "<|message_sep|>";
2213122131        } else {
2213222132            ss << "<s>";
2213322133        }
22134-          
22134+ 
2213522135        // Process remaining messages
2213622136        for (size_t i = has_system ? 1 : 0; i < chat.size(); i++) {
2213722137            std::string role(chat[i]->role);
@@ -22142,7 +22142,7 @@ static int32_t llama_chat_apply_template_internal(
2214222142                ss << "assistant<|role_sep|>" << chat[i]->content << "<|message_sep|>";
2214322143            }
2214422144        }
22145-          
22145+ 
2214622146        // Add generation prompt if needed
2214722147        if (add_ass) {
2214822148            ss << "assistant<|role_sep|>";
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments