llm-bot
Async Python library and LLM-backed bot service.
The current implementation exposes stateless chat and grounded HRAG answering, embeddings, sentiment analysis, title generation, summary, named entity recognition, entity relationship extraction, graph query generation, translation, linking, clustering, and cybersecurity classification endpoints backed by OpenAI-compatible APIs.
Requirements
uv- Python 3.13
Python library
Install a published release into a Python 3.13 project with uv add taranis-llm-bot.
The PyPI distribution is taranis-llm-bot; Python imports use llm_bot.
This base install contains the reusable task library without the HTTP server runtime.
Before publishing, install a locally built wheel with
uv add /absolute/path/to/taranis_llm_bot-VERSION-py3-none-any.whl.
Set LLM_BASE_URL, LLM_API_KEY, and optionally LLM_MODEL and LLM_API_MODE
in the environment or .env before importing the library. Call the async
task functions directly; no bot HTTP server is needed:
import asyncio
from llm_bot.schemas import SummarizeRequest
from llm_bot.tasks.summarize import summarize
async def main():
result = await summarize(SummarizeRequest(text="Text to summarize", language="en", max_words=80))
print(result.summary)
# result.model_dump() returns a dictionary.
asyncio.run(main())
In an existing async application, use await summarize(...) directly. Other
tasks follow the same pattern: request models in llm_bot.schemas, async functions
in llm_bot.tasks (for example, ner.extract_entities and translate.translate_text).
An optional client=LLMClient(...) argument overrides the LLM connection for a call;
import it from llm_bot.client. Inputs and outputs are Pydantic models, and errors
propagate to the caller. Linking also needs the LOOKUP_* configuration; embeddings
use EMBEDDING_*.
For the HTTP service, install the server extra with
uv add "taranis-llm-bot[server]". Then import create_app from llm_bot.app
and expose app = create_app() in your ASGI entry point.
Setup
uv sync --locked --extra dev --extra server
./scripts/check.sh
cp .env.example .env
Configure the following values in .env:
LLM_BASE_URLLLM_API_KEYLLM_MODEL(optional if your OpenAI-compatible backend provides a default model)LLM_API_MODE:responses(default) orchat_completions
See Configuration for optional settings.
Run
uv sync --locked --extra server
uv run granian --interface asgi app:app --port 5500
API
See the API reference for endpoint examples. Interactive Swagger
docs are available at GET /docs; the OpenAPI document is at GET /openapi.yaml.
Guides
- Batch processing: process multiple story texts in one provider batch job.
- Configuration: LLM, reasoning, embedding, and lookup settings.
- Build and publish: build distributions and publish releases.
Development checks
uv sync --locked --extra dev --extra server
uv run pre-commit install
./scripts/check.sh
The script installs development dependencies, checks lint and
formatting (including Python examples in Markdown), and runs the full test suite.
The installed pre-commit hook, pull request CI, and release validation all run
this same script. Run uv run pre-commit run --all-files to check manually.
Metadata
Release files for taranis-llm-bot 0.1.5
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 |
|---|---|---|---|---|
| taranis_llm_bot-0.1.5.tar.gz | 125.4 kB | Without provenance | Details for taranis_llm_bot-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| taranis_llm_bot-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for taranis_llm_bot-0.1.5-py3-none-any.whl |
Total release size: 191.4 kB
Release files / taranis_llm_bot-0.1.5.tar.gz
| Download URL | taranis_llm_bot-0.1.5.tar.gz |
|---|---|
| Size | 125.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
405e140237103ebb2f1502ec26f1c808674d3b6f0ca391210f4fee988970f77a
|
|
BLAKE2b-256 checksum How to use checksums |
cadade5cf7542814527d38776a201096efd2e2446abf9ae8f48820adc2c5a83f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / taranis_llm_bot-0.1.5-py3-none-any.whl
| Download URL | taranis_llm_bot-0.1.5-py3-none-any.whl |
|---|---|
| Size | 66.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
999488ba156f6cea906288c9d745ac721b4ed16bd9a6f1b543bea19d24f2d477
|
|
BLAKE2b-256 checksum How to use checksums |
5ff21aa1f1239f0a9f297b98c08afb103a7b6cc774aac2722d51005c53e5378d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for taranis-llm-bot 0.1.5
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.