ai-mini-box-llm
LLM plugin for ai-mini-box-core — adds natural language processing: message classification, response drafting, entity extraction, and RAG.
Features
- Classify messages by topic (Prices, Order, Complaint, Schedule, Other)
- Draft auto-responses to customer messages
- Extract entities (phone, name, address, date, order ID)
- RAG — Retrieval-Augmented Generation from Knowledge Base
- Two providers: local (GGUF via llama-cpp-python) or remote (OpenAI API)
- CLI commands for status, testing, model download, KB indexing
Installation
pip install ai-mini-box-llm[local] # local inference
pip install ai-mini-box-llm[remote] # OpenAI API
Configuration
Config file: data/llm_config.json (auto-created with defaults):
{
"provider": "local",
"model_path": "data/models/Phi-3-mini-q4.gguf",
"n_ctx": 4096,
"n_threads": 4,
"rag_enabled": false,
"rag_top_k": 3
}
Usage
# Show status
ai-mini-box llm status
# Classify a message
ai-mini-box llm classify "сколько стоит доставка?"
# Generate a draft response
ai-mini-box llm draft "хочу заказать пиццу" --topic "Заказ"
# Extract entities
ai-mini-box llm extract "Позвоните Ивану по телефону +7 123 456 78 90"
# Download a model
ai-mini-box llm download-model Qwen/Qwen2.5-0.5B-Instruct-GGUF:q4_0
# Rebuild RAG index
ai-mini-box llm ingest-kb
Architecture
The plugin registers an LlmService implementation via the generic service registry:
from ai_mini_box.core.services.registry import register_service, get_service
# Registration (done by plugin automatically)
register_service("llm", MyLlmService())
# Usage by any other module
llm = get_service("llm")
if llm:
topic = llm.classify("How much?")
When the plugin is not installed, get_service("llm") returns None, and the core falls back to built-in heuristics (KeywordClassifier, regex extraction).
Requirements
- Python 3.12+
- ai-mini-box-core >= 5.0.0
- Optional: llama-cpp-python, openai, huggingface-hub
Metadata
Release files for ai-mini-box-llm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_mini_box_llm-0.1.0.tar.gz | 10.0 kB | Without provenance | Details for ai_mini_box_llm-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_mini_box_llm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ai_mini_box_llm-0.1.0-py3-none-any.whl |
Total release size: 26.9 kB
Release files / ai_mini_box_llm-0.1.0.tar.gz
| Download URL | ai_mini_box_llm-0.1.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f56ea36748949dc7ae2d4ab9a0425151233a2323f9924c9441691af387118803
|
|
BLAKE2b-256 checksum How to use checksums |
1295a2c42851131f2f7f296fd1fcded06d5eef419afbd5fd498a2a43e956ee26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / ai_mini_box_llm-0.1.0-py3-none-any.whl
| Download URL | ai_mini_box_llm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b843ee1736709a71edf48423e861869840c5190cbb7b85a12d877bc23acf972f
|
|
BLAKE2b-256 checksum How to use checksums |
72c41110f761a86886fd5aeb9fcf95a05090b21800dbe92765303748815454a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for ai-mini-box-llm 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.