Revert formatting changes
This commit is contained in:
parent
f9c0653e7d
commit
ed887e0d8c
|
|
@ -1,6 +1,5 @@
|
|||
#include "arg.h"
|
||||
#include "chat.h"
|
||||
#include "common.h"
|
||||
#include "arg.h"
|
||||
#include "console.h"
|
||||
// #include "log.h"
|
||||
|
||||
|
|
@ -8,11 +7,10 @@
|
|||
#include "server-context.h"
|
||||
#include "server-task.h"
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <fstream>
|
||||
#include <thread>
|
||||
#include <signal.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
|
|
@ -22,7 +20,7 @@
|
|||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
static const char * LLAMA_ASCII_LOGO = R"(
|
||||
const char * LLAMA_ASCII_LOGO = R"(
|
||||
▄▄ ▄▄
|
||||
██ ██
|
||||
██ ██ ▀▀█▄ ███▄███▄ ▀▀█▄ ▄████ ████▄ ████▄
|
||||
|
|
@ -39,7 +37,7 @@ static bool should_stop() {
|
|||
}
|
||||
|
||||
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(_WIN32)
|
||||
static void signal_handler(int /*unused*/) {
|
||||
static void signal_handler(int) {
|
||||
if (g_is_interrupted.load()) {
|
||||
// second Ctrl+C - exit immediately
|
||||
// make sure to clear colors before exiting (not using LOG or console.cpp here to avoid deadlock)
|
||||
|
|
@ -268,7 +266,9 @@ int main(int argc, char ** argv) {
|
|||
console::spinner::stop();
|
||||
console::log("\n");
|
||||
|
||||
std::thread inference_thread([&ctx_cli]() { ctx_cli.ctx_server.start_loop(); });
|
||||
std::thread inference_thread([&ctx_cli]() {
|
||||
ctx_cli.ctx_server.start_loop();
|
||||
});
|
||||
|
||||
auto inf = ctx_cli.ctx_server.get_meta();
|
||||
std::string modalities = "text";
|
||||
|
|
@ -378,7 +378,8 @@ int main(int argc, char ** argv) {
|
|||
ctx_cli.input_files.clear();
|
||||
console::log("Chat history cleared.\n");
|
||||
continue;
|
||||
} else if ((string_starts_with(buffer, "/image ") && inf.has_inp_image) ||
|
||||
} else if (
|
||||
(string_starts_with(buffer, "/image ") && inf.has_inp_image) ||
|
||||
(string_starts_with(buffer, "/audio ") && inf.has_inp_audio)) {
|
||||
// just in case (bad copy-paste for example), we strip all trailing/leading spaces
|
||||
std::string fname = string_strip(buffer.substr(7));
|
||||
|
|
@ -498,8 +499,7 @@ int main(int argc, char ** argv) {
|
|||
if (params.show_timings) {
|
||||
console::set_display(DISPLAY_TYPE_INFO);
|
||||
console::log("\n");
|
||||
console::log("[ Prompt: %.1f t/s | Generation: %.1f t/s ]\n", timings.prompt_per_second,
|
||||
timings.predicted_per_second);
|
||||
console::log("[ Prompt: %.1f t/s | Generation: %.1f t/s ]\n", timings.prompt_per_second, timings.predicted_per_second);
|
||||
console::set_display(DISPLAY_TYPE_RESET);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue