Skip to main content

reeln-cli plugin for OpenAI-powered LLM integration (metadata, translation, zoom)

Project description

reeln-plugin-openai

A reeln-cli plugin for OpenAI-powered LLM integration — livestream metadata, game thumbnails, playlist descriptions, and multi-language translation.

Features

  • Livestream metadata — LLM-generated title and description for game livestreams
  • Playlist metadata — creative playlist titles and descriptions
  • Game image thumbnails — ESPN/NBC Sports broadcast-style thumbnails from team logos via OpenAI image generation
  • Multi-language translation — batch or per-language translation with custom commentator personas
  • Prompt templates — customizable {{variable}} templates with override support

Install

pip install reeln-plugin-openai

Or for development:

git clone https://github.com/StreamnDad/reeln-plugin-openai
cd reeln-plugin-openai
make dev-install

Configuration

Add the plugin to your reeln config:

{
  "plugins": {
    "enabled": ["openai"],
    "settings": {
      "openai": {
        "enabled": true,
        "api_key_file": "~/.config/reeln/secrets/openai_api_key.txt",
        "model": "gpt-4.1",
        "playlist_enabled": true,
        "game_image_enabled": true,
        "game_image_output_dir": "~/Documents/game_images"
      }
    }
  }
}

API Key

The plugin resolves the OpenAI API key in this order:

  1. api_key_file config — reads key from the specified file (recommended)
  2. OPENAI_API_KEY environment variable — fallback for dev/CI

Config Fields

Field Type Default Description
enabled bool false Enable OpenAI LLM integration
api_key_file str "" Path to file containing the OpenAI API key
model str "gpt-4.1" OpenAI model for text generation
request_timeout_seconds float 30.0 API request timeout
prompt_overrides str (JSON) "{}" Dict of prompt name to override file path
prompt_context str (JSON) "{}" Dict of prompt name to extra context lines
translate_enabled bool false Enable multi-language translation
translate_languages str (JSON) "{}" Dict of language code to name
translate_per_language_prompts str (JSON) "{}" Dict of language code to prompt name
playlist_enabled bool false Enable LLM-generated playlist metadata
game_image_enabled bool false Enable game image thumbnail generation
game_image_model str "gpt-5.2" Model for image generation orchestration
game_image_renderer_model str "gpt-image-1.5" Model for image rendering
game_image_output_dir str "" Directory to save generated game images

Hooks

Hook What it does
ON_GAME_INIT Generates livestream metadata, playlist metadata, game image thumbnail, and translations

Shared Context

The plugin writes to context.shared for other plugins to consume:

context.shared["livestream_metadata"]  # {"title": "...", "description": "...", "translations": {...}}
context.shared["playlist_metadata"]    # {"title": "...", "description": "...", "translations": {...}}
context.shared["game_image"]           # {"image_path": "/path/to/thumbnail.png"}

Development

make dev-install    # uv venv + editable install with dev deps
make test           # pytest with 100% coverage
make lint           # ruff check
make format         # ruff format
make check          # lint + mypy + test

License

AGPL-3.0-only

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reeln_plugin_openai-0.9.0.tar.gz (53.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reeln_plugin_openai-0.9.0-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file reeln_plugin_openai-0.9.0.tar.gz.

File metadata

  • Download URL: reeln_plugin_openai-0.9.0.tar.gz
  • Upload date:
  • Size: 53.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for reeln_plugin_openai-0.9.0.tar.gz
Algorithm Hash digest
SHA256 6a4c6d7d75f28f2a4f2efabaa1ff075d3b71ada4f13cab6d8ff218a6c386971d
MD5 a0acae2f5f8c057ff0413ac0cd0eb593
BLAKE2b-256 c6447cc8cb61a693d21bcc3f89c93e5e8c29ac615671b69e56a51f5d0aaf846a

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_openai-0.9.0.tar.gz:

Publisher: release.yml on StreamnDad/reeln-plugin-openai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reeln_plugin_openai-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reeln_plugin_openai-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99b335b7d83279f0b0df4a36e56c0ab7f8e2a0df9768dbdeaacbcf97ab84cd8a
MD5 05774995f8dd6edaf6d22ae1a9eb512f
BLAKE2b-256 551676c9b8948cf2665f75a49b97caeef5bb036d0ea2c9eac103d5bfc0efd043

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_openai-0.9.0-py3-none-any.whl:

Publisher: release.yml on StreamnDad/reeln-plugin-openai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page