Skip to content

Commit

Permalink
chore: use modelfile crate
Browse files Browse the repository at this point in the history
  • Loading branch information
covercash2 committed Nov 20, 2024
1 parent 08ddb97 commit accf12b
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 2,189 deletions.
50 changes: 42 additions & 8 deletions ollama/ollama-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ollama/ollama-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ extend = "1.2.0"
derive_builder = "0.20.2"
futures = "0.3.30"
itertools = "0.13.0"
modelfile = "0.2.0"
nom = "7.1.3"
ollama-rs = { version = "0.2.1", features = ["stream"] }
ratatui = { version = "0.28.1", features = ["unstable-widget-ref"] }
Expand Down
3 changes: 2 additions & 1 deletion ollama/ollama-cli/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use modelfile::modelfile::error::ModelfileError;
use ollama_rs::error::OllamaError;
use thiserror::Error;
use tokio::sync::mpsc::error::SendError;

use crate::{lm::Response, ollama::modelfile::error::ModelfileError};
use crate::lm::Response;

pub type Result<T> = std::result::Result<T, Error>;

Expand Down
1 change: 0 additions & 1 deletion ollama/ollama-cli/src/ollama/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use crate::error::Result;
pub mod chat;
pub mod embeddings;
pub mod generate;
pub mod modelfile;

pub const DEFAULT_MODEL: &str = "mistral-nemo";
pub const DEFAULT_DOMAIN: &str = "hoss";
Expand Down
10 changes: 0 additions & 10 deletions ollama/ollama-cli/src/ollama/modelfile/error.rs

This file was deleted.

Loading

0 comments on commit accf12b

Please sign in to comment.