From 895bb2a697d96d8ff836697ccd1428e2c9ced3f4 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Tue, 25 Jun 2024 10:50:25 +0200 Subject: [PATCH] Update examples/main/main.cpp Co-authored-by: Georgi Gerganov --- examples/main/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 3a26d0220..cfaf6a6e8 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -873,7 +873,7 @@ int main(int argc, char ** argv) { } std::string user_inp = params.conversation - ? chat_add_and_format(model, chat_msgs, "user", buffer) + ? chat_add_and_format(model, chat_msgs, "user", std::move(buffer)) : std::move(buffer); // TODO: one inconvenient of current chat template implementation is that we can't distinguish between user input and special tokens (prefix/postfix) const auto line_pfx = ::llama_tokenize(ctx, params.input_prefix, false, true);