5454 Commits

Author SHA1 Message Date
Akarshan
03f0c5aad6
fix: remove unsupported BOOL for windows_sys in cleanup to fix windows build(attempt 3) 2025-07-03 18:35:13 +05:30
Akarshan
11db1ecaed
fix: server-side Ctrl-C handling for Windows x86_64 targets (attempt 2)
The current implementation of Ctrl-C handling was not properly tested on Windows x86_64 architectures. To address this, the code has been modified to use `i32` instead of `BOOL` to handle the result of the `GenerateConsoleCtrlEvent` function, ensuring that the return value is correctly checked across different platforms.
2025-07-03 14:13:56 +05:30
Akarshan
6ab7d37a08
fix: Update Cargo.toml dependencies on Windows & fix Ctrl+C handling on Windows
This change updates the dependencies of the Cargo.toml file on Windows to include additional features from the `windows-sys` crate. The `CreateProcess flags like CREATE_NEW_PROCESS_GROUP` feature is now enabled to allow for proper process management.
The code now properly sends Ctrl+C to the llama process on Windows, and also includes error handling for when the Ctrl+C command fails. Additionally, it now uses the `Windows` API to kill the process when it times out, and properly handles the wait for the process to exit.
2025-07-03 13:51:59 +05:30
Faisal Amir
c34291237f enhancement: add hub detail page 2025-07-03 13:36:00 +07:00
Faisal Amir
0343c09704 🧹cleanup: hub model title should not truncate just let make another line 2025-07-03 11:05:34 +07:00
Akarshan
c2493fc535
Fix camelCase 2025-07-03 09:13:33 +05:30
Akarshan
396573055f
Address bot's review comment and minor refactoring 2025-07-03 09:13:33 +05:30
Akarshan
37151ba926
Feat: Auto load and download default backend during first launch 2025-07-03 09:13:32 +05:30
hiento09
f572350c20
chore: migrate to selfhosted runner (#5593) 2025-07-03 00:05:52 +07:00
Bob Ros
c778e8bcac
Merge branch 'dev' into de_de-i18n 2025-07-02 15:49:59 +02:00
Bui Quang Huy
b173fe2dcb
Merge pull request #5677 from menloresearch/template/add-type
Update 2-feature-request.md
2025-07-02 19:00:30 +08:00
Bui Quang Huy
264895cd59
Update 2-feature-request.md 2025-07-02 18:59:07 +08:00
Louis
e123d22b8d
fix: deprecate sidecar run 2025-07-02 12:48:50 +07:00
Akarshan
663c720f2a
Add windows-sys to cargo.toml 2025-07-02 12:29:03 +07:00
Akarshan
449bf17692
Add process aliveness check 2025-07-02 12:29:03 +07:00
Louis
0dbfde4c80
refactor: wait for extension load 2025-07-02 12:29:02 +07:00
Louis
66bae2adb8
chore: clean up 2025-07-02 12:29:02 +07:00
Louis
9b730058b4
feat: use hardware information api 2025-07-02 12:29:02 +07:00
Louis
d264220245
fix: restrict Windows-specific code to x86_64 and update scripts
Updated Rust code to apply Windows-specific logic only on x86_64 targets using #[cfg(all(windows, target_arch = "x86_64"))]. Modified dev:tauri script in package.json to remove CLEAN=true and added CLEAN=true to beforeDevCommand in tauri.conf.json for consistency. Minor formatting changes in tauri.conf.json.
2025-07-02 12:29:02 +07:00
Louis
2bdbce2e40
refactor: clean up unused apis 2025-07-02 12:29:02 +07:00
Louis
c6ac9f1d2a
feat: sync hub with model catalog 2025-07-02 12:29:01 +07:00
Louis
c9c1ff1778
refactor: clean up core node packages 2025-07-02 12:28:38 +07:00
Louis
b538d57207
feat: auto unload models on model start 2025-07-02 12:28:25 +07:00
Akarshan
0cbf35dc77
Add auto unload setting to llamacpp-extension 2025-07-02 12:28:25 +07:00
Louis
f70bb2705d
🔧test: util and lib unit tests 2025-07-02 12:28:25 +07:00
Louis
5edc773535
fix: wait for model start 2025-07-02 12:28:25 +07:00
Akarshan
54691044d4
Add missing --jinja flag 2025-07-02 12:28:25 +07:00
Louis
ae58c427a5
fix: tool call params 2025-07-02 12:28:25 +07:00
Akarshan
6b86baaa2f
Add tool choice type 2025-07-02 12:28:24 +07:00
Akarshan
6d5251d1c6
Fixup tool type definition 2025-07-02 12:28:24 +07:00
Akarshan
7f25311d26
Add tool type to chat completion requests 2025-07-02 12:28:24 +07:00
Louis
8bd4a3389f
refactor: frontend uses new engine extension
# Conflicts:
#	extensions/model-extension/resources/default.json
#	web-app/src/containers/dialogs/DeleteProvider.tsx
#	web-app/src/routes/hub.tsx
2025-07-02 12:28:24 +07:00
Akarshan
ad06b2a903
Move llama-server cleanup code to a separate file 2025-07-02 12:27:42 +07:00
Akarshan
7de694c0cd
add missing import during rebase 2025-07-02 12:27:42 +07:00
Akarshan
62ba503b86
chore: cleanup llama-server processes upon app exit 2025-07-02 12:27:42 +07:00
Akarshan
01d49a4b28
fix: Update server process handling for Windows and Unix systems 2025-07-02 12:27:42 +07:00
Thien Tran
7dbc2c3af2
download lib at build time 2025-07-02 12:27:41 +07:00
Akarshan
48d1164858
feat: add embedding support to llamacpp extension
This commit introduces embedding functionality to the llamacpp extension. It allows users to generate embeddings for text inputs using the 'sentence-transformer-mini' model.  The changes include:

- Adding a new `embed` method to the `llamacpp_extension` class.
- Implementing model loading and API interaction for embeddings.
- Handling potential errors during API requests.
- Adding necessary types for embedding responses and data.
- The load method now accepts a boolean parameter to determine if it should load embedding model.
2025-07-02 12:27:36 +07:00
Akarshan
2eeabf8ae6
fix: ensure server process is properly terminated and reaped 2025-07-02 12:27:35 +07:00
Akarshan
f463008362
feat: add model load wait to ensure model is ready before use 2025-07-02 12:27:35 +07:00
Akarshan
9d4e7cb2b8
fix: correct model_id to model_id in console error message
This change ensures that the error message includes the correct model ID, as `modelId` is capitalized in the `sInfo` object.
2025-07-02 12:27:35 +07:00
Akarshan
d60257ebbd
Revert: extension/yarn.lock 2025-07-02 12:27:35 +07:00
Akarshan
dbcce86bb8
refactor: rename interfaces and add getLoadedModels
The changes include:
- Renaming interfaces (sessionInfo -> SessionInfo, unloadResult -> UnloadResult) for consistency
- Adding getLoadedModels() method to retrieve active model IDs
- Updating variable names from modelId to model_id for alignment
- Updating cleanup paths to use XDG-standard locations
- Improving type consistency across extension implementation
2025-07-02 12:27:35 +07:00
Akarshan
4ffc504150
style: Rename camelCase to snake_case in llamacpp extension code
Rename variable, struct, and enum names from camelCase to snake_case throughout the llamacpp extension codebase to align with Rust naming conventions. This change improves readability and consistency without altering functionality.
2025-07-02 12:27:34 +07:00
Akarshan
c2b606a3fc
feat: enhance chatCompletionRequest with advanced sampling parameters
Add comprehensive sampling parameters for fine-grained control over AI output generation, including dynamic temperature, Mirostat sampling, repetition penalties, and advanced prompt handling. These parameters enable more precise tuning of model behavior and output quality.
2025-07-02 12:27:34 +07:00
Akarshan
6c769c5db9
feat: refactor llama server process storage to use HashMap
Change the llama_server_process state from an Option<Child> to a HashMap<String, Child> to support managing multiple server instances by PID. This allows precise process tracking and termination, replacing the previous single-process limitation.

Previously, only one server process could be tracked at a time. Now, each process is stored with its PID as the key, enabling:
- Accurate session matching during unloading
- Proper termination of specific processes
- Better error handling for mismatched PIDs

The load_llama_model function now inserts processes into the map, and unload_llama_model removes them by PID.
2025-07-02 12:27:34 +07:00
Thien Tran
8bf4a5eb7d
remove migration 2025-07-02 12:27:34 +07:00
Thien Tran
525cc93d4a
fix system cudart detection on linux 2025-07-02 12:27:34 +07:00
Thien Tran
ae349159ce
remove yarn install:cortex 2025-07-02 12:27:33 +07:00
Thien Tran
95944fa081
add Jan's library path to path 2025-07-02 12:27:17 +07:00