RWKV: Fix the chat template not being used
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
This commit is contained in:
parent
738c166112
commit
95e25a6c1f
1 changed files with 1 additions and 1 deletions
|
@ -21734,7 +21734,7 @@ static int32_t llama_chat_apply_template_internal(
|
||||||
if (add_ass) {
|
if (add_ass) {
|
||||||
ss << "[|assistant|]";
|
ss << "[|assistant|]";
|
||||||
}
|
}
|
||||||
} else if (tmpl == "rwkv-world" || tmpl_contains("'User: ' + message['content'] + '\n\nAssistant:'")) {
|
} else if (tmpl == "rwkv-world" || tmpl_contains("rwkv-world") || tmpl_contains("'User: ' + message['content'] + '\n\nAssistant:'")) {
|
||||||
for (auto message : chat) {
|
for (auto message : chat) {
|
||||||
std::string role(message->role);
|
std::string role(message->role);
|
||||||
if (role == "user") {
|
if (role == "user") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue