Add TODOs
This commit is contained in:
parent
89dec115b7
commit
3b4655728d
1 changed files with 6 additions and 1 deletions
|
@ -84,6 +84,10 @@ struct SharedState {
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
|
// TODO add autostart of models based on config
|
||||||
|
// abstract starting logic out of handler for this to allow seperate calls to start
|
||||||
|
// maybe add to SharedState & LLamaInstance ?
|
||||||
|
|
||||||
initialize_logger();
|
initialize_logger();
|
||||||
// Read and parse the YAML configuration
|
// Read and parse the YAML configuration
|
||||||
let config_str = std::fs::read_to_string("config.yaml").expect("Failed to read config.yaml");
|
let config_str = std::fs::read_to_string("config.yaml").expect("Failed to read config.yaml");
|
||||||
|
@ -264,9 +268,10 @@ async fn handle_request(
|
||||||
cmd.kill_on_drop(true);
|
cmd.kill_on_drop(true);
|
||||||
cmd.envs(model_config.env.clone());
|
cmd.envs(model_config.env.clone());
|
||||||
cmd.args(&args);
|
cmd.args(&args);
|
||||||
|
// TODO use openport crate via pick_random_unused_port for determining these
|
||||||
cmd.arg("--port");
|
cmd.arg("--port");
|
||||||
cmd.arg(format!("{}", model_config.internal_port));
|
cmd.arg(format!("{}", model_config.internal_port));
|
||||||
cmd.stdout(Stdio::null()).stderr(Stdio::null());
|
cmd.stdout(Stdio::null()).stderr(Stdio::null()); // TODO save output and allow retrieval via api
|
||||||
|
|
||||||
tracing::info!("Starting llama-server with {:?}", cmd);
|
tracing::info!("Starting llama-server with {:?}", cmd);
|
||||||
let process = Arc::new(Mutex::new(
|
let process = Arc::new(Mutex::new(
|
||||||
|
|
Loading…
Add table
Reference in a new issue