Skip to content

Commit

Permalink
expand shell
Browse files Browse the repository at this point in the history
  • Loading branch information
Endle committed Sep 7, 2024
1 parent 422c38d commit bb75fc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion fire_seq_search_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ stop-words = "0.7.2"

regex = "1"
lingua = { version = "1.4.0", default-features = false, features = ["chinese", "english"] }

shellexpand = "3.1"

#Highlight (Output)
html-escape = "0.2.13"
Expand All @@ -63,6 +63,7 @@ pdf-extract-temporary-mitigation-panic = "0.7.1"


# llm related
# TODO I should make them optional
sha256 = "1.5.0"
reqwest = { version = "0.12", features = ["json"] }
futures = "0.3"
Expand Down
8 changes: 3 additions & 5 deletions fire_seq_search_server/src/local_llm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,19 +286,17 @@ struct LlamaFileDef {
}


use shellexpand::tilde;
async fn locate_llamafile() -> Option<String> {
// TODO
let mut lf = LlamaFileDef {
filename: "mistral-7b-instruct-v0.2.Q4_0.llamafile".to_owned(),
filepath: None,
sha256: "1903778f7defd921347b25327ebe5dd902f29417ba524144a8e4f7c32d83dee8".to_owned(),
download_link: "mistral-7b-instruct-v0.2.Q4_0.llamafile".to_owned(),
};

// TODO hack in dev
//let lf_path = "/var/home/lizhenbo/Downloads/mistral-7b-instruct-v0.2.Q4_0.llamafile";
let lf_base = "/Users/zhenboli/.llamafile/";
let lf_path = lf_base.to_owned() + &lf.filename;
let lf_base = tilde("~/.llamafile/");
let lf_path = lf_base.to_string() + &lf.filename;
lf.filepath = Some( lf_path.to_owned() );
info!("lf {:?}", &lf);

Expand Down

0 comments on commit bb75fc1

Please sign in to comment.