llama : fix llama_chat_format_single for mistral (#8657)

* fix `llama_chat_format_single` for mistral

* fix typo

* use printf
This commit is contained in:
Xuan Son Nguyen 2024-07-24 13:48:46 +02:00 committed by GitHub
parent 79167d9e49
commit 96952e7181
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 7 deletions

View file

@ -124,6 +124,7 @@ static std::string chat_add_and_format(struct llama_model * model, std::vector<l
auto formatted = llama_chat_format_single(
model, g_params->chat_template, chat_msgs, new_msg, role == "user");
chat_msgs.push_back({role, content});
LOG("formatted: %s\n", formatted.c_str());
return formatted;
}