Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

ai-mini-box-llm

LLM plugin for ai-mini-box — local and remote inference, RAG

Published25 Jun 2026
Direct dependencies5
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
ai-mini-box-core
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
ai-mini-box-core>=5.0.0runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8; extra == "dev"runtime
huggingface-hub
Environment
{
  "extras": "",
  "marker": "extra == \"download\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
huggingface-hub>=0.20; extra == "download"runtime
llama-cpp-python
Environment
{
  "extras": "",
  "marker": "extra == \"local\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
llama-cpp-python>=0.2; extra == "local"runtime
openai
Environment
{
  "extras": "",
  "marker": "extra == \"remote\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.0; extra == "remote"runtime

Distribution files

2 collected
ai_mini_box_llm-0.1.0-py3-none-any.whl

bdist_wheel · 16.54 KB · Python py3

Source file
ai_mini_box_llm-0.1.0.tar.gz

sdist · 9.77 KB · Python source

Source file

Repository

PENDING
kibertum/ai-mini-box

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:19 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:263d6cbcd0ba591b035a1f25b316394fa170247b38df1f94e4b3fadd5df5115d

Other collected versions

View all collected versions →