pulling_models/main.rs
1use simple_llama_rs::{DEFAULT_PULL_URL, PullInfo, pull_model};
2
3#[tokio::main]
4async fn main() {
5 match pull_model(
6 &PullInfo{
7 model: "llama3.1".to_string(),
8 insecure: false,
9 stream: false,
10 },
11 DEFAULT_PULL_URL,
12 )
13 .await
14 {
15 Err(e) => {
16 eprintln!("Error happened with deleting the model: {e}"); // This will handle reqwest errors not ollama.
17 }
18 Ok(val) => {
19 println!("{} {}", val.status_code, val.response)
20 }
21 };
22}