From a53a59c82f94b2707253e09089e17b01710f7519 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Fri, 16 Aug 2024 11:01:04 +0200 Subject: [PATCH] Update examples/server/server.cpp Co-authored-by: Georgi Gerganov --- examples/server/server.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 809c8d7e50172..ce711eadd29ac 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -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; }