Akarshan 0c5fbc102c
refactor: Simplify Tauri plugin calls and enhance 'Flash Attention' setting
This commit introduces significant improvements to the llama.cpp extension, focusing on the 'Flash Attention' setting and refactoring Tauri plugin interactions for better code clarity and maintenance.

The backend interaction is streamlined by removing the unnecessary `libraryPath` argument from the Tauri plugin commands for loading models and listing devices.

* **Simplified API Calls:** The `loadLlamaModel`, `unloadLlamaModel`, and `get_devices` functions in both the extension and the Tauri plugin now manage the library path internally based on the backend executable's location.
* **Decoupled Logic:** The extension (`src/index.ts`) now uses the new, simplified Tauri plugin functions, which enhances modularity and reduces boilerplate code in the extension.
* **Type Consistency:** Added `UnloadResult` interface to `guest-js/index.ts` for consistency.

* **Updated UI Control:** The 'Flash Attention' setting in `settings.json` is changed from a boolean checkbox to a string-based dropdown, offering **'auto'**, **'on'**, and **'off'** options.
* **Improved Logic:** The extension logic in `src/index.ts` is updated to correctly handle the new string-based `flash_attn` configuration. It now passes the string value (`'auto'`, `'on'`, or `'off'`) directly as a command-line argument to the llama.cpp backend, simplifying the version-checking logic previously required for older llama.cpp versions. The old, complex logic tied to specific backend versions is removed.

This refactoring cleans up the extension's codebase and moves environment and path setup concerns into the Tauri plugin where they are most relevant.
2025-10-29 08:00:57 +05:30
2025-10-28 17:26:27 +07:00
2025-10-28 17:26:27 +07:00
2025-10-28 17:26:27 +07:00
2025-10-28 17:26:27 +07:00
2025-10-24 13:09:35 +07:00
2025-10-28 17:26:27 +07:00
2025-10-02 15:26:37 +07:00
2025-10-28 17:26:27 +07:00
2023-10-30 23:20:10 +07:00
2025-09-16 20:38:56 +07:00
2025-10-28 17:26:27 +07:00
2023-12-29 11:30:16 +07:00
2025-10-24 09:01:31 +07:00
2024-10-28 23:09:25 +07:00
2025-08-26 11:17:59 +07:00
2025-10-07 18:32:43 +07:00
2025-10-28 17:26:27 +07:00
2025-07-15 22:29:28 +07:00

Jan - Open-source ChatGPT replacement

github jan banner

GitHub commit activity Github Last Commit Github Contributors GitHub closed issues Discord

Getting Started - Community - Changelog - Bug reports

Jan is bringing the best of open-source AI in an easy-to-use product. Download and run LLMs with full control and privacy.

Installation

The easiest way to get started is by downloading one of the following versions for your respective operating system:

Platform Download
Windows jan.exe
macOS jan.dmg
Linux (deb) jan.deb
Linux (AppImage) jan.AppImage

Download from jan.ai or GitHub Releases.

Features

  • Local AI Models: Download and run LLMs (Llama, Gemma, Qwen, GPT-oss etc.) from HuggingFace
  • Cloud Integration: Connect to GPT models via OpenAI, Claude models via Anthropic, Mistral, Groq, and others
  • Custom Assistants: Create specialized AI assistants for your tasks
  • OpenAI-Compatible API: Local server at localhost:1337 for other applications
  • Model Context Protocol: MCP integration for agentic capabilities
  • Privacy First: Everything runs locally when you want it to

Build from Source

For those who enjoy the scenic route:

Prerequisites

  • Node.js ≥ 20.0.0
  • Yarn ≥ 1.22.0
  • Make ≥ 3.81
  • Rust (for Tauri)

Run with Make

git clone https://github.com/janhq/jan
cd jan
make dev

This handles everything: installs dependencies, builds core components, and launches the app.

Available make targets:

  • make dev - Full development setup and launch
  • make build - Production build
  • make test - Run tests and linting
  • make clean - Delete everything and start fresh

Manual Commands

yarn install
yarn build:tauri:plugin:api
yarn build:core
yarn build:extensions
yarn dev

System Requirements

Minimum specs for a decent experience:

  • macOS: 13.6+ (8GB RAM for 3B models, 16GB for 7B, 32GB for 13B)
  • Windows: 10+ with GPU support for NVIDIA/AMD/Intel Arc
  • Linux: Most distributions work, GPU acceleration available

For detailed compatibility, check our installation guides.

Troubleshooting

If things go sideways:

  1. Check our troubleshooting docs
  2. Copy your error logs and system specs
  3. Ask for help in our Discord #🆘|jan-help channel

Contributing

Contributions welcome. See CONTRIBUTING.md for the full spiel.

Contact

License

Apache 2.0 - Because sharing is caring.

Acknowledgements

Built on the shoulders of giants:

Description
Languages
TypeScript 54.9%
JavaScript 34.1%
Rust 8.6%
Python 1.5%
Shell 0.4%
Other 0.5%