diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 6757d213d..e81624009 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -237,21 +237,15 @@ int main(int argc, char ** argv) { if (!path_session.empty()) { LOG_TEE("%s: attempting to load saved session from '%s'\n", __func__, path_session.c_str()); - if (!file_exists(path_session)) - { + if (!file_exists(path_session)) { LOG_TEE("%s: session file does not exist, will create.\n", __func__); - } - else if (file_size(path_session) == 0) - { + } else if (file_size(path_session) == 0) { LOG_TEE("%s: The session file is empty. A new session will be initialized.\n", __func__); - } - else - { + } else { // The file exists and is not empty session_tokens.resize(n_ctx); size_t n_token_count_out = 0; - if (!llama_load_session_file(ctx, path_session.c_str(), session_tokens.data(), session_tokens.capacity(), &n_token_count_out)) - { + if (!llama_load_session_file(ctx, path_session.c_str(), session_tokens.data(), session_tokens.capacity(), &n_token_count_out)) { LOG_TEE("%s: error: failed to load session file '%s'\n", __func__, path_session.c_str()); return 1; }