Skip to content

Commit ee94172

Browse files
authored
server : add support for the RPC backend (#7305)
ref: #7292
1 parent 934266c commit ee94172

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/server/server.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,6 +2387,7 @@ static void server_print_usage(const char * argv0, const gpt_params & params, co
23872387
printf(" --lora-base FNAME optional model to use as a base for the layers modified by the LoRA adapter\n");
23882388
printf(" --host ip address to listen (default (default: %s)\n", sparams.hostname.c_str());
23892389
printf(" --port PORT port to listen (default (default: %d)\n", sparams.port);
2390+
printf(" --rpc SERVERS comma separated list of RPC servers\n");
23902391
printf(" --path PUBLIC_PATH path from which to serve static files (default: disabled)\n");
23912392
printf(" --api-key API_KEY optional api key to enhance server security. If set, requests must include this key for access.\n");
23922393
printf(" --api-key-file FNAME path to file containing api keys delimited by new lines. If set, requests must include one of the keys for access.\n");
@@ -2439,6 +2440,12 @@ static void server_params_parse(int argc, char ** argv, server_params & sparams,
24392440
break;
24402441
}
24412442
sparams.port = std::stoi(argv[i]);
2443+
} else if (arg == "--rpc") {
2444+
if (++i >= argc) {
2445+
invalid_param = true;
2446+
break;
2447+
}
2448+
params.rpc_servers = argv[i];
24422449
} else if (arg == "--host") {
24432450
if (++i >= argc) {
24442451
invalid_param = true;

0 commit comments

Comments
 (0)