feat: allow specifying port via command line argument
This change allows the port to be specified via command line arguments, providing flexibility. The port is parsed from the arguments, defaulting to 8080 if not provided.
This commit is contained in:
parent
5d61062b0e
commit
f9d3935269
@ -83,7 +83,13 @@ pub async fn load_llama_model(
|
||||
)));
|
||||
}
|
||||
|
||||
let port = 8080; // Default port
|
||||
let port = args
|
||||
.iter()
|
||||
.position(|arg| arg == "--port")
|
||||
.and_then(|i| args.get(i + 1))
|
||||
.cloned()
|
||||
.unwrap_or_default();
|
||||
|
||||
let modelPath = args
|
||||
.iter()
|
||||
.position(|arg| arg == "-m")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user