* Improve Llama.cpp model path handling and validation This commit refactors the load_llama_model function to improve how it handles and validates the model path. Previously, the function extracted the model path but did not perform any validation. This change adds the following improvements: It now checks for the presence of the -m flag. It verifies that a path is provided after the -m flag. It validates that the specified model path actually exists on the filesystem. It ensures that the SessionInfo struct stores the canonical display path of the model, which is a more robust approach. These changes make the model loading process more reliable and provide better error handling for invalid or missing model paths. * Exp: Use short path on Windows * Fix: Remove error channel and handling in llama.cpp server loading The previous implementation used a channel to receive error messages from the llama.cpp server's stdout. However, this proved unreliable as the path names can contain 'errors strings' that we use to check even during normal operation. This commit removes the error channel and associated error handling logic. The server readiness is still determined by checking for the "server is listening" message in stdout. Errors are now handled by relying on the process exit code and capturing the full stderr output if the process fails to start or exits unexpectedly. This approach provides a more robust and accurate error detection mechanism. * Add else block in Windows path handling * Add some path related tests * Fix windows tests
75 lines
2.1 KiB
TOML
75 lines
2.1 KiB
TOML
[package]
|
|
name = "Jan"
|
|
version = "0.6.599"
|
|
description = "Use offline LLMs with your own data. Run open source models like Llama2 or Falcon on your internal computers/servers."
|
|
authors = ["Jan <service@jan.ai>"]
|
|
license = "MIT"
|
|
repository = "https://github.com/menloresearch/jan"
|
|
edition = "2021"
|
|
rust-version = "1.77.2"
|
|
|
|
[lib]
|
|
name = "app_lib"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2.0.2", features = [] }
|
|
|
|
[dependencies]
|
|
serde_json = "1.0"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
log = "0.4"
|
|
tauri = { version = "2.5.0", features = [ "protocol-asset", "macos-private-api",
|
|
"test"
|
|
] }
|
|
tauri-plugin-log = "2.0.0-rc"
|
|
tauri-plugin-shell = "2.2.0"
|
|
tauri-plugin-os = "2.2.1"
|
|
tauri-plugin-opener = "2.2.7"
|
|
flate2 = "1.0"
|
|
tar = "0.4"
|
|
rand = "0.8"
|
|
tauri-plugin-http = { version = "2", features = ["unsafe-headers"] }
|
|
tauri-plugin-store = "2"
|
|
hyper = { version = "0.14", features = ["server"] }
|
|
reqwest = { version = "0.11", features = ["json", "blocking", "stream"] }
|
|
tokio = { version = "1", features = ["full"] }
|
|
rmcp = { git = "https://github.com/modelcontextprotocol/rust-sdk", rev = "3196c95f1dfafbffbdcdd6d365c94969ac975e6a", features = [
|
|
"client",
|
|
"transport-sse-client",
|
|
"transport-child-process",
|
|
"tower",
|
|
"reqwest",
|
|
] }
|
|
uuid = { version = "1.7", features = ["v4"] }
|
|
env = "1.0.1"
|
|
futures-util = "0.3.31"
|
|
tokio-util = "0.7.14"
|
|
url = "2.5"
|
|
tauri-plugin-dialog = "2.2.1"
|
|
dirs = "6.0.0"
|
|
sysinfo = "0.34.2"
|
|
ash = "0.38.0"
|
|
nvml-wrapper = "0.10.0"
|
|
tauri-plugin-deep-link = "2"
|
|
fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs" }
|
|
serde_yaml = "0.9.34"
|
|
hmac = "0.12.1"
|
|
sha2 = "0.10.9"
|
|
base64 = "0.22.1"
|
|
libloading = "0.8.7"
|
|
thiserror = "2.0.12"
|
|
nix = "=0.30.1"
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
libc = "0.2.172"
|
|
windows-sys = { version = "0.60.2", features = ["Win32_Storage_FileSystem"] }
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
|
tauri-plugin-updater = "2"
|
|
once_cell = "1.18"
|
|
tauri-plugin-single-instance = { version = "2.0.0", features = ["deep-link"] }
|
|
|
|
[target.'cfg(windows)'.dev-dependencies]
|
|
tempfile = "3.20.0"
|