Skip to content

Commit d4008e3

Browse files
committed
wip
1 parent b09255d commit d4008e3

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

apps/desktop/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
},
6868
"resources": {
6969
"dlls/*": "./",
70-
"resources/llm.gguf": "llm.gguf"
70+
"resources/": ""
7171
}
7272
},
7373
"plugins": {

plugins/local-llm/src/ext/plugin.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ impl<R: Runtime, T: Manager<R>> LocalLlmPluginExt<R> for T {
4848
}
4949

5050
fn models_dir(&self) -> PathBuf {
51-
self.path().app_data_dir().unwrap().join("ttt")
51+
let a = self
52+
.path()
53+
.resolve("ttt", tauri::path::BaseDirectory::Resource)
54+
.unwrap();
55+
tracing::info!("models_dir: {:?}", a);
56+
a
5257
}
5358

5459
#[tracing::instrument(skip_all)]

plugins/local-llm/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,7 @@ pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
9090
}
9191

9292
{
93-
let model_path = if cfg!(debug_assertions) {
94-
app.path()
95-
.resolve("resources/llm.gguf", BaseDirectory::Resource)?
96-
} else {
97-
app.path().resolve("llm.gguf", BaseDirectory::Resource)?
98-
};
93+
let model_path = app.path().resolve("llm.gguf", BaseDirectory::Resource)?;
9994

10095
let state = State {
10196
api_base: None,

plugins/local-stt/src/ext.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ impl<R: Runtime, T: Manager<R>> LocalSttPluginExt<R> for T {
7272
}
7373

7474
fn models_dir(&self) -> PathBuf {
75-
self.path().app_data_dir().unwrap().join("stt")
75+
let a = self
76+
.path()
77+
.resolve("stt", tauri::path::BaseDirectory::Resource)
78+
.unwrap();
79+
tracing::info!("models_dir: {:?}", a);
80+
a
7681
}
7782

7883
fn list_ggml_backends(&self) -> Vec<hypr_whisper_local::GgmlBackend> {

0 commit comments

Comments
 (0)