From eb06c402b5994702b0b3ac77c4b9a0ea3b52032b Mon Sep 17 00:00:00 2001 From: travolin Date: Mon, 25 Nov 2024 16:30:57 -0800 Subject: [PATCH] Add llm model dir accessor --- crates/shared/src/config.rs | 4 ++++ crates/spyglass-searcher/src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/shared/src/config.rs b/crates/shared/src/config.rs index 0cf83d43b..3907e06fe 100644 --- a/crates/shared/src/config.rs +++ b/crates/shared/src/config.rs @@ -359,6 +359,10 @@ impl Config { self.model_dir().join("embeddings") } + pub fn llm_model_dir(&self) -> PathBuf { + self.model_dir().join("llm") + } + pub fn prefs_dir() -> PathBuf { let proj_dirs = ProjectDirs::from("com", "athlabs", &Config::app_identifier()) .expect("Unable to find a suitable settings directory"); diff --git a/crates/spyglass-searcher/src/lib.rs b/crates/spyglass-searcher/src/lib.rs index 7ef208fbb..5bb770806 100644 --- a/crates/spyglass-searcher/src/lib.rs +++ b/crates/spyglass-searcher/src/lib.rs @@ -127,7 +127,7 @@ pub trait WriteTrait { type SearcherResult = Result; -#[derive(Clone, Serialize)] +#[derive(Clone, Serialize, Debug)] pub struct RetrievedDocument { pub doc_id: String, pub domain: String,