Skip to main content

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 classification endpoints backed by OpenAI-compatible APIs and a decisions API.

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_*. Cybersecurity classification uses the independent DECISIONS_* connection when DECISIONS_URL is set; you can inject a DecisionsClient from llm_bot.decisions_client or an LLMClient to explicitly select either transport. Fine-grained classification uses ClassifyRequest and llm_bot.tasks.classify.classify_text, always with a DecisionsClient and the DECISIONS_* connection.

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_URL
  • LLM_API_KEY
  • LLM_MODEL (optional if your OpenAI-compatible backend provides a default model)
  • LLM_API_MODE: responses (default) or chat_completions

See Configuration for optional settings.

To route /cybersec-classification to a decision model, also set DECISIONS_URL to the full endpoint URL, DECISIONS_MODEL, and DECISIONS_API_KEY if required. DECISIONS_API_MODE=systemone (default) supports OpenRouter's https://openrouter.ai/api/alpha/decisions and llama.cpp/vLLM /v1/systemone; use openai for /v1/decisions. The public classification response stays unchanged.

POST /classify requires the same decisions configuration. Send {"text":"Article text"} to receive probabilities for disinformation, security incident, vulnerability, threat intelligence, security policy, security news, general news, and other. These describe the main topic; disinformation is a topic label, not a truth verdict. See the classification API for category definitions. The live evaluation records 24 examples and how to rerun them.

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

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.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taranis-llm-bot 0.1.6
File Size Uploaded Provenance Actions
taranis_llm_bot-0.1.6.tar.gz 145.2 kB Without provenance Details for taranis_llm_bot-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for taranis-llm-bot 0.1.6
File Interpreter ABI Platform Actions
taranis_llm_bot-0.1.6-py3-none-any.whl Python 3 none any Details for taranis_llm_bot-0.1.6-py3-none-any.whl

Total release size: 218.2 kB

Release files / taranis_llm_bot-0.1.6.tar.gz

Download URL taranis_llm_bot-0.1.6.tar.gz
Size 145.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4d1368fe43b837d53af7a5e29cc6657806213ba4014d9301788c409dd5b19503
BLAKE2b-256 checksum
How to use checksums
69428dd06d1749143d4ee23481a67fc3ac7e511c7b9eca824f373ae1124e5288
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","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.6-py3-none-any.whl

Download URL taranis_llm_bot-0.1.6-py3-none-any.whl
Size 73.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27a6f0a550c400f2cfe65d055d2b453f8137255d202b1f4fa66bd1ad97788d6b
BLAKE2b-256 checksum
How to use checksums
825ced236ac95f27e3d9c5fd7593f8f0b99bdc63942cd09f55a23ee1a0d809fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","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.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page