Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

Merge pull request #6134 from menloresearch/feat/attachment-ui

Faisal Amir5481ee9e3581
diff --cc src-tauri/plugins/tauri-plugin-llamacpp/src/commands.rs
index 16590491e,bc9a7213c..35dc35c5e
--- a/src-tauri/plugins/tauri-plugin-llamacpp/src/commands.rs
+++ b/src-tauri/plugins/tauri-plugin-llamacpp/src/commands.rs
@@@ -55,16 -53,9 +55,17 @@@ pub async fn load_llama_model<R: Runtim
let port = parse_port_from_args(&args);
let model_path_pb = validate_model_path(&mut args)?;
+ let _mmproj_path_pb = validate_mmproj_path(&mut args)?;
- let api_key = extract_arg_value(&args, "--api-key");
+ let api_key: String;
+
+ if let Some(api_value) = envs.get("LLAMA_API_KEY") {
+ api_key = api_value.to_string();
+ } else {
+ log::warn!("API key not provided");
+ api_key = "".to_string();
+ }
+
let model_id = extract_arg_value(&args, "-a");
// Configure the command to run the server