feat(localai): Upgrade to v3.9.0 with Agent Jobs and Memory Reclaimer
Upgrade LocalAI from v2.25.0 to v3.9.0 with new features: - **Agent Jobs Panel**: Schedule and manage background agentic tasks - **Memory Reclaimer**: LRU eviction for loaded models, automatic VRAM cleanup - **VibeVoice backend**: New voice synthesis support Update README with: - v3.9 feature highlights - Complete CLI command reference - Model presets table (tinyllama, phi2, mistral, gte-small) - API endpoints documentation - SecuBox Couche 2 integration notes This is part of the v0.18 AI Gateway roadmap. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8cf4039fbb
commit
113f41b09c
@ -9,7 +9,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=secubox-app-localai
|
PKG_NAME:=secubox-app-localai
|
||||||
PKG_VERSION:=2.25.0
|
PKG_VERSION:=3.9.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|||||||
@ -2,10 +2,33 @@
|
|||||||
|
|
||||||
Native LLM server with OpenAI-compatible REST API. Supports GGUF models on ARM64 and x86_64.
|
Native LLM server with OpenAI-compatible REST API. Supports GGUF models on ARM64 and x86_64.
|
||||||
|
|
||||||
|
**Version**: 3.9.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- OpenAI-compatible REST API (`/v1/chat/completions`, `/v1/completions`, `/v1/embeddings`)
|
||||||
|
- GGUF model support (LLaMA, Mistral, Phi, TinyLlama, etc.)
|
||||||
|
- ARM64 and x86_64 architectures
|
||||||
|
- **Agent Jobs Panel** (v3.9) — Schedule and manage background agentic tasks
|
||||||
|
- **Memory Reclaimer** (v3.9) — LRU eviction for loaded models
|
||||||
|
- Embeddings support (GTE-Small preset)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
opkg install secubox-app-localai
|
opkg install secubox-app-localai
|
||||||
|
|
||||||
|
# Download the binary (first run)
|
||||||
|
localaictl install
|
||||||
|
|
||||||
|
# Install a model
|
||||||
|
localaictl model-install tinyllama
|
||||||
|
|
||||||
|
# Enable and start service
|
||||||
|
uci set localai.main.enabled=1
|
||||||
|
uci commit localai
|
||||||
|
/etc/init.d/localai enable
|
||||||
|
/etc/init.d/localai start
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@ -15,40 +38,68 @@ UCI config file: `/etc/config/localai`
|
|||||||
```
|
```
|
||||||
config localai 'main'
|
config localai 'main'
|
||||||
option enabled '0'
|
option enabled '0'
|
||||||
option port '8080'
|
option api_port '8081'
|
||||||
|
option api_host '0.0.0.0'
|
||||||
option models_path '/srv/localai/models'
|
option models_path '/srv/localai/models'
|
||||||
|
option threads '4'
|
||||||
|
option context_size '2048'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Model Presets
|
||||||
|
|
||||||
|
| Preset | Size | Description |
|
||||||
|
|--------|------|-------------|
|
||||||
|
| tinyllama | 669MB | TinyLlama 1.1B (chat) |
|
||||||
|
| phi2 | 1.6GB | Microsoft Phi-2 (chat) |
|
||||||
|
| mistral | 4.1GB | Mistral 7B Instruct (chat) |
|
||||||
|
| gte-small | 67MB | GTE Small (embeddings) |
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Install the binary (downloaded on first run)
|
localaictl model-install tinyllama
|
||||||
localaictl install
|
localaictl model-install gte-small # For embeddings
|
||||||
|
|
||||||
# Start / stop the service
|
|
||||||
localaictl start
|
|
||||||
localaictl stop
|
|
||||||
|
|
||||||
# Check status
|
|
||||||
localaictl status
|
|
||||||
|
|
||||||
# Download a model
|
|
||||||
localaictl model-pull <model-name>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The binary is downloaded from GitHub releases on first `localaictl install`.
|
## CLI Commands
|
||||||
|
|
||||||
## Features
|
```sh
|
||||||
|
# Install/Uninstall
|
||||||
|
localaictl install # Download binary from GitHub
|
||||||
|
localaictl uninstall # Remove binary
|
||||||
|
|
||||||
- OpenAI-compatible REST API
|
# Service
|
||||||
- GGUF model support (LLaMA, Mistral, Phi, TinyLlama, etc.)
|
localaictl start # Start service
|
||||||
- ARM64 and x86_64 architectures
|
localaictl stop # Stop service
|
||||||
|
localaictl restart # Restart service
|
||||||
|
localaictl status # Show status
|
||||||
|
localaictl logs [-f] # Show logs
|
||||||
|
|
||||||
|
# Models
|
||||||
|
localaictl models # List installed models
|
||||||
|
localaictl model-install <name> # Install model
|
||||||
|
localaictl model-remove <name> # Remove model
|
||||||
|
|
||||||
|
# Backends
|
||||||
|
localaictl backends # List available backends
|
||||||
|
```
|
||||||
|
|
||||||
|
## API Endpoints
|
||||||
|
|
||||||
|
Default port: 8081
|
||||||
|
|
||||||
|
| Endpoint | Description |
|
||||||
|
|----------|-------------|
|
||||||
|
| `/v1/models` | List loaded models |
|
||||||
|
| `/v1/chat/completions` | Chat completion |
|
||||||
|
| `/v1/completions` | Text completion |
|
||||||
|
| `/v1/embeddings` | Generate embeddings |
|
||||||
|
| `/readyz` | Health check |
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|
||||||
- `/etc/config/localai` -- UCI configuration
|
- `/etc/config/localai` — UCI configuration
|
||||||
- `/usr/sbin/localaictl` -- controller CLI
|
- `/usr/sbin/localaictl` — Controller CLI
|
||||||
- `/srv/localai/models/` -- model storage directory
|
- `/usr/bin/local-ai` — Binary (downloaded)
|
||||||
|
- `/srv/localai/models/` — Model storage
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
@ -57,6 +108,18 @@ The binary is downloaded from GitHub releases on first `localaictl install`.
|
|||||||
- `wget-ssl`
|
- `wget-ssl`
|
||||||
- `ca-certificates`
|
- `ca-certificates`
|
||||||
|
|
||||||
|
## SecuBox Integration
|
||||||
|
|
||||||
|
LocalAI serves as the inference backend for SecuBox AI Gateway (Couche 2):
|
||||||
|
- Local-first LLM inference
|
||||||
|
- MCP Server integration for agent tools
|
||||||
|
- Supports Threat Analyst, CVE Triage, and other autonomous agents
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
|
## Sources
|
||||||
|
|
||||||
|
- [LocalAI GitHub](https://github.com/mudler/LocalAI)
|
||||||
|
- [LocalAI v3.9.0 Release](https://github.com/mudler/LocalAI/releases)
|
||||||
|
|||||||
@ -8,7 +8,7 @@ CONFIG="localai"
|
|||||||
BINARY="/usr/bin/local-ai"
|
BINARY="/usr/bin/local-ai"
|
||||||
DATA_DIR="/srv/localai"
|
DATA_DIR="/srv/localai"
|
||||||
BACKEND_ASSETS="/usr/share/localai/backend-assets"
|
BACKEND_ASSETS="/usr/share/localai/backend-assets"
|
||||||
LOCALAI_VERSION="2.25.0"
|
LOCALAI_VERSION="3.9.0"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user