summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2024-02-22 10:38:00 +0100
committertslil clingman <tslil@posteo.de>2024-02-22 10:38:00 +0100
commitf9072b8aaa8635b045a7c578e9e019d6dc445a0c (patch)
tree6fb43e49db2193f41f5e8e356d7ce0f95c110a49
parent3e5c497fb172a8a516c1a76544fb33fbd8ec8e0a (diff)
[emacs/copilot.el] upstream has --no-display-prompt
-rw-r--r--emacs/scripts/copilot.el2
-rw-r--r--llama.cpp_silent_prompt.patch49
2 files changed, 1 insertions, 50 deletions
diff --git a/emacs/scripts/copilot.el b/emacs/scripts/copilot.el
index 3332010..247b40c 100644
--- a/emacs/scripts/copilot.el
+++ b/emacs/scripts/copilot.el
@@ -132,7 +132,7 @@ Writing English explanations is forbidden. ")
(with-local-quit
(call-process copilot-llama.cpp nil (list (current-buffer) nil) t
"-m" copilot-model
- "--silent-prompt"
+ "--no-display-prompt"
"--log-disable"
"--prompt-cache" cash
"--prompt-cache-all"
diff --git a/llama.cpp_silent_prompt.patch b/llama.cpp_silent_prompt.patch
deleted file mode 100644
index 71b6ad8..0000000
--- a/llama.cpp_silent_prompt.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-commit 90b0d35e400a078545401840f78c0bf02207864d
-Author: tslil clingman <>
-Date: Sun Dec 31 18:50:17 2023 +0100
-
- add --silent-prompt
-
-diff --git a/common/common.cpp b/common/common.cpp
-index eacaee1..f939b50 100644
---- a/common/common.cpp
-+++ b/common/common.cpp
-@@ -592,6 +592,8 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
- params.numa = true;
- } else if (arg == "--verbose-prompt") {
- params.verbose_prompt = true;
-+ } else if (arg == "--silent-prompt") {
-+ params.silent_prompt = true;
- } else if (arg == "-r" || arg == "--reverse-prompt") {
- if (++i >= argc) {
- invalid_param = true;
-diff --git a/common/common.h b/common/common.h
-index 9659aa0..01c68fa 100644
---- a/common/common.h
-+++ b/common/common.h
-@@ -122,6 +122,7 @@ struct gpt_params {
- bool use_mlock = false; // use mlock to keep model in memory
- bool numa = false; // attempt optimizations that help on some NUMA systems
- bool verbose_prompt = false; // print prompt tokens before generation
-+ bool silent_prompt = false; // don't print prompt to stdout
- bool infill = false; // use infill mode
- bool dump_kv_cache = false; // dump the KV cache contents for debugging purposes
- bool no_kv_offload = false; // disable KV offloading
-@@ -240,4 +241,3 @@ void dump_kv_cache_view(const llama_kv_cache_view & view, int row_size = 80);
-
- // Dump the KV cache view showing individual sequences in each cell (long output).
- void dump_kv_cache_view_seqs(const llama_kv_cache_view & view, int row_size = 40);
--
-diff --git a/examples/main/main.cpp b/examples/main/main.cpp
-index c096f11..8676ab4 100644
---- a/examples/main/main.cpp
-+++ b/examples/main/main.cpp
-@@ -461,7 +461,7 @@ int main(int argc, char ** argv) {
- }
-
- bool is_antiprompt = false;
-- bool input_echo = true;
-+ bool input_echo = !params.silent_prompt;
- bool need_to_save_session = !path_session.empty() && n_matching_session_tokens < embd_inp.size();
-
- int n_past = 0;