Skip to content

Commit 4daae0b

Browse files
author
ochafik
committed
Update run.cpp
1 parent a57bb94 commit 4daae0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/run/run.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,14 +720,14 @@ static int apply_chat_template(const minja::chat_template & tmpl, LlamaData & ll
720720
for (const auto & msg : llama_data.messages) {
721721
messages.push_back({
722722
{"role", msg.role},
723-
{ "content", msg.content}
723+
{"content", msg.content},
724724
});
725725
}
726726
try {
727727
auto result = tmpl.apply(messages, /* tools= */ json(), append);
728728
llama_data.fmtted.resize(result.size() + 1);
729729
memcpy(llama_data.fmtted.data(), result.c_str(), result.size() + 1);
730-
return llama_data.fmtted.size();
730+
return result.size();
731731
} catch (const std::exception & e) {
732732
printe("failed to render the chat template: %s\n", e.what());
733733
return -1;

0 commit comments

Comments
 (0)