summaryrefslogtreecommitdiff
path: root/common/common.cpp
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2024-06-06 19:19:59 +0300
committerGitHub <noreply@github.com>2024-06-06 19:19:59 +0300
commitee459f40f65810a810151b24eba5b8bd174ceffe (patch)
treeb845384364c74201816c3f02f63158cd3d751d1c /common/common.cpp
parentf83351f9a62a6262f1fc3d08f320033089cddfb5 (diff)
server : fix --threads-http arg (#7801)
Diffstat (limited to 'common/common.cpp')
-rw-r--r--common/common.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/common.cpp b/common/common.cpp
index 601bd216..cdcb352b 100644
--- a/common/common.cpp
+++ b/common/common.cpp
@@ -1414,6 +1414,14 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
params.timeout_write = std::stoi(argv[i]);
return true;
}
+ if (arg == "--threads-http") {
+ if (++i >= argc) {
+ invalid_param = true;
+ return true;
+ }
+ params.n_threads_http = std::stoi(argv[i]);
+ return true;
+ }
if (arg == "-spf" || arg == "--system-prompt-file") {
if (++i >= argc) {
invalid_param = true;
@@ -1893,6 +1901,7 @@ void gpt_params_print_usage(int /*argc*/, char ** argv, const gpt_params & param
options.push_back({ "server", " --ssl-key-file FNAME", "path to file a PEM-encoded SSL private key" });
options.push_back({ "server", " --ssl-cert-file FNAME", "path to file a PEM-encoded SSL certificate" });
options.push_back({ "server", " --timeout N", "server read/write timeout in seconds (default: %d)", params.timeout_read });
+ options.push_back({ "server", " --threads-http N", "number of threads used to process HTTP requests (default: %d)", params.n_threads_http });
options.push_back({ "server", " --system-prompt-file FNAME",
"set a file to load a system prompt (initial prompt of all slots), this is useful for chat applications" });
options.push_back({ "server", " --log-format {text,json}",