Skip to content

Commit cdcdf9b

Browse files
committed
chore: update CLI options
Signed-off-by: Xin Liu <[email protected]>
1 parent 160b70e commit cdcdf9b

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/main.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,14 @@ pub struct AppState {
3434
async fn main() -> Result<(), ServerError> {
3535
let matches = Command::new("rag-api-server")
3636
.version(crate_version!())
37-
.arg(
38-
Arg::new("socket_addr")
39-
.short('s')
40-
.long("socket-addr")
41-
.value_name("IP:PORT")
42-
.help("Sets the socket address")
43-
.default_value(DEFAULT_SOCKET_ADDRESS),
44-
)
4537
.arg(
4638
Arg::new("model_name")
4739
.short('m')
4840
.long("model-name")
4941
.value_name("MODEL-NAME")
5042
.value_delimiter(',')
51-
.help("Sets names for chat and embedding models. The names are separated by comma without space, for example, 'Llama-2-7b,all-minilm'.")
43+
.help("Sets names for chat and embedding models. The names are separated by comma without space, for example, '--model-name Llama-2-7b,all-minilm'.")
44+
.required(true),
5245
)
5346
.arg(
5447
Arg::new("model_alias")
@@ -66,7 +59,7 @@ async fn main() -> Result<(), ServerError> {
6659
.value_name("CTX_SIZE")
6760
.value_delimiter(',')
6861
.value_parser(clap::value_parser!(u64))
69-
.help("Sets context sizes for chat and embedding models. The sizes are separated by comma without space, for example, '4096,384'. The first value is for the chat model, and the second value is for the embedding model.")
62+
.help("Sets context sizes for chat and embedding models. The sizes are separated by comma without space, for example, '--ctx-size 4096,384'. The first value is for the chat model, and the second value is for the embedding model.")
7063
.default_value("4096,384"),
7164
)
7265
.arg(
@@ -166,6 +159,14 @@ async fn main() -> Result<(), ServerError> {
166159
.help("Root path for the Web UI files")
167160
.default_value("chatbot-ui"),
168161
)
162+
.arg(
163+
Arg::new("socket_addr")
164+
.short('s')
165+
.long("socket-addr")
166+
.value_name("IP:PORT")
167+
.help("Sets the socket address")
168+
.default_value(DEFAULT_SOCKET_ADDRESS),
169+
)
169170
.get_matches();
170171

171172
println!("\n[+] Configuring LlamaEdge RAG API server ...");

0 commit comments

Comments
 (0)