···5959 }
6060 };
61616262- let model = modelfile.from.as_ref().unwrap();
6363- if model.starts_with("driaforall/mem-agent") {
6464- let _res = run_model_with_server(self, modelfile, &run_args)
6565- .await
6666- .inspect_err(|e| eprintln!("Failed to run the model due to {e}"));
6767- } else {
6868- run_model_by_sub_process(modelfile);
6969- }
6262+ let _res = run_model_with_server(self, modelfile, &run_args)
6363+ .await
6464+ .inspect_err(|e| eprintln!("Failed to run the model due to {e}"));
7065 }
71667267 #[allow(clippy::zombie_processes)]
···124119 }
125120}
126121122122+#[allow(dead_code)]
127123fn run_model_by_sub_process(modelfile: Modelfile) {
128124 // build the arg list from modelfile
129125 let mut args: Vec<String> = vec![];
···417413 }
418414}
419415420420-async fn ping() -> Result<(), String> {
416416+pub async fn ping() -> Result<(), String> {
421417 let client = Client::new();
422418 let res = client.get("http://127.0.0.1:6969/ping").send().await;
423419