Skip to content

Commit 051bf88

Browse files
slarenngxson
andauthored
Update examples/simple-chat/simple-chat.cpp
Co-authored-by: Xuan Son Nguyen <[email protected]>
1 parent afec610 commit 051bf88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/simple-chat/simple-chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ int main(int argc, char ** argv) {
178178

179179
// add the response to the messages
180180
messages.push_back({"assistant", strdup(response.c_str())});
181-
prev_len = llama_chat_apply_template(model, nullptr, messages.data(), messages.size(), false, formatted.data(), formatted.size());
181+
prev_len = llama_chat_apply_template(model, nullptr, messages.data(), messages.size(), false, nullptr, 0);
182182
if (prev_len < 0) {
183183
fprintf(stderr, "failed to apply the chat template\n");
184184
return 1;

0 commit comments

Comments
 (0)