Update examples/main/main.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Xuan Son Nguyen 2024-06-25 10:50:25 +02:00 committed by GitHub
parent a28e70fde8
commit 895bb2a697
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -873,7 +873,7 @@ int main(int argc, char ** argv) {
} }
std::string user_inp = params.conversation 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); : 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) // 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); const auto line_pfx = ::llama_tokenize(ctx, params.input_prefix, false, true);