Skip to content

Commit

Permalink
trying to make deps optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Endle committed Sep 21, 2024
1 parent b80f076 commit 359b216
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
12 changes: 9 additions & 3 deletions fire_seq_search_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,16 @@ pulldown-cmark = { version = "0.9.2", default-features = false }
pdf-extract-temporary-mitigation-panic = "0.7.1"



# TODO Currently turn them off will make cargo build fail
# I should make these deps optional, so those who doesn't want LLM could have a smaller binary
sha256 = { version = "1.5.0", optional = true }
reqwest = { version = "0.12", features = ["json"], optional = true }
serde_derive = { version = "1.0.209", optional = true}
reqwest = { version = "0.12", features = ["json"], optional = false }
serde_derive = { version = "1.0.209", optional = false}

[features]
#default = ["llm"]
llm = ["sha256", "reqwest", "serde_derive"]
llm = ["sha256",
#"serde_derive",
#"request"
]
16 changes: 9 additions & 7 deletions fire_seq_search_server/src/local_llm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ use std::borrow::Cow;
use std::borrow::Cow::Borrowed;


use reqwest;
use reqwest::StatusCode;
use shellexpand::tilde;

use serde_derive::Deserialize;
use serde_derive::Serialize;
use serde;
//#[cfg(feature = "llm")]
use {
reqwest,
reqwest::StatusCode,
shellexpand::tilde,

serde_derive::Deserialize,
serde_derive::Serialize,
};



Expand Down

0 comments on commit 359b216

Please sign in to comment.