From c88f2d3b7163c0da6cab68b2fbc19f28153bf645 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sat, 30 Nov 2024 16:12:03 -0800 Subject: [PATCH] Release llamafile v0.8.17 --- llama.cpp/common.cpp | 3 ++- llamafile/flags.cpp | 7 +++++++ llamafile/server/main.1 | 2 +- llamafile/server/main.1.asc | 2 +- llamafile/version.h | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/llama.cpp/common.cpp b/llama.cpp/common.cpp index 8364426377..1c215ff339 100644 --- a/llama.cpp/common.cpp +++ b/llama.cpp/common.cpp @@ -311,9 +311,10 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa } return true; } - if (arg == "-p" || arg == "--prompt") { + if (arg == "-p" || arg == "--prompt" || arg == "--system-prompt") { CHECK_ARG params.prompt = argv[i]; + FLAG_prompt = argv[i]; // [jart] return true; } if (arg == "-e" || arg == "--escape") { diff --git a/llamafile/flags.cpp b/llamafile/flags.cpp index def697e607..bcd1d2fc96 100644 --- a/llamafile/flags.cpp +++ b/llamafile/flags.cpp @@ -188,6 +188,13 @@ void llamafile_get_flags(int argc, char **argv) { continue; } + if (!strcmp(flag, "--prompt") || !strcmp(flag, "--system-prompt")) { + if (i == argc) + missing("--prompt"); + FLAG_prompt = argv[i++]; + continue; + } + if (!strcmp(flag, "--db")) { if (i == argc) missing("--db"); diff --git a/llamafile/server/main.1 b/llamafile/server/main.1 index 4b0a720a66..58a59a43bd 100644 --- a/llamafile/server/main.1 +++ b/llamafile/server/main.1 @@ -58,7 +58,7 @@ resources, and control how much completion parallelism can happen. Please note that .Fl Fl ctx-size has a strong influence on how many slots can be created. -.It Fl p Ar TEXT , Fl Fl prompt Ar TEXT +.It Fl p Ar TEXT , Fl Fl prompt Ar TEXT , Fl Fl system-prompt Ar TEXT Specifies system prompt. This value is passed along to the web frontend. .It Fl Fl no-display-prompt Hide system prompt from web user interface. diff --git a/llamafile/server/main.1.asc b/llamafile/server/main.1.asc index a9534f2350..c2db481e38 100644 --- a/llamafile/server/main.1.asc +++ b/llamafile/server/main.1.asc @@ -64,7 +64,7 @@ note that --ctx-size has a strong influence on how many slots can be created. - -p TEXT, --prompt TEXT + -p TEXT, --prompt TEXT, --system-prompt TEXT Specifies system prompt. This value is passed along to the web frontend. diff --git a/llamafile/version.h b/llamafile/version.h index 4b0bed495f..ba219daff0 100644 --- a/llamafile/version.h +++ b/llamafile/version.h @@ -2,7 +2,7 @@ #define LLAMAFILE_MAJOR 0 #define LLAMAFILE_MINOR 8 -#define LLAMAFILE_PATCH 16 +#define LLAMAFILE_PATCH 17 #define LLAMAFILE_VERSION \ (100000000 * LLAMAFILE_MAJOR + 1000000 * LLAMAFILE_MINOR + LLAMAFILE_PATCH)