Update examples/server/server.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Xuan Son Nguyen 2024-08-16 11:01:04 +02:00 committed by GitHub
parent 4af74d81f8
commit a53a59c82f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -690,11 +690,13 @@ struct server_context {
if (model == nullptr) {
LOG_ERROR("unable to load model", {{"model", params.model}});
return false;
} else {
n_ctx = llama_n_ctx(ctx);
add_bos_token = llama_add_bos_token(model);
has_eos_token = !llama_add_eos_token(model);
}
n_ctx = llama_n_ctx(ctx);
add_bos_token = llama_add_bos_token(model);
has_eos_token = !llama_add_eos_token(model);
return true;
}