refactor cli config and move most of it to own_assist_common so that it can be reused in other clients.
This commit is contained in:
@@ -34,7 +34,6 @@ impl OllamaConfig {
|
||||
);
|
||||
}
|
||||
|
||||
let ollama_default_url = Url::parse("http://127.0.0.1:11434").unwrap();
|
||||
let mut ollama = ollama_rs::Ollama::from_url(self.url.clone());
|
||||
ollama.set_headers(Some(ollama_headers));
|
||||
|
||||
@@ -69,9 +68,7 @@ impl OllamaConfig {
|
||||
create_model_request = create_model_request.system(system_prompt.clone());
|
||||
}
|
||||
|
||||
ollama
|
||||
.create_model(create_model_request)
|
||||
.await
|
||||
ollama.create_model(create_model_request).await
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user