Skip to main content

HolocronAI

A Star Wars character AI chat interface using PyQt and LLMs. This tool allows users to interact with AI-powered versions of characters from Knights of the Old Republic, leveraging game dialog data to maintain authentic character personalities.

Features

  • Modern PyQt-based UI with dark theme

  • Real-time character-by-character response generation

  • Dialog embedding generation for character personality modeling

  • Customizable LLM backend through LiteLLM

  • Game installation integration through PyKotor

  • Extracts all dialogs from KOTOR installations

  • Uses DITTO self-alignment framework for dynamic response generation

  • Implements Beyond Dialog concepts for contextual understanding

  • No hardcoded patterns or pre-training required

  • Maintains character consistency through embedding-based alignment

Installation

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install in development mode:
pip install -e .

Usage

Run the application:

holocron-ai
  1. Select your KOTOR game installation directory
  2. Wait for dialog processing and embedding generation
  3. Choose a character to interact with
  4. Start chatting!

The system will:

  1. Extract all dialogs from the installation
  2. Process them through the self-alignment system
  3. Start an interactive session where you can chat with the character

How It Works

HolocronAI uses three main components:

  1. Dialog Processor: Extracts and processes dialogs from KOTOR installations, converting them into embeddings that capture semantic meaning.

  2. Self-Alignment System: Implements the DITTO framework to maintain character consistency without relying on hardcoded patterns. This system:

    • Dynamically learns from dialog embeddings
    • Adjusts responses based on conversation context
    • Maintains character consistency through embedding alignment
  3. Character Agent: Combines the dialog processor and self-alignment system to generate responses that are:

    • Contextually appropriate
    • Character-consistent
    • Based on actual game dialog

Example Interaction

> Hello there!

Character: I see you're not one for subtlety. Very well - I'll be direct as well.

> What do you think about the Jedi?

Character: The Jedi... Their Code is their weakness. The galaxy has far more 
shades of gray than their black and white philosophies would suggest.

Technical Details

  • Uses sentence-transformers for generating embeddings
  • Implements dynamic context weighting based on semantic similarity
  • Maintains conversation history with sliding context window
  • Automatically saves processed data for faster subsequent runs

Requirements

  • Python 3.8+
  • KOTOR installation
  • Dependencies listed in setup.py

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for holocron-ai 0.1.1

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

Source distribution (sdist)

Source distribution for holocron-ai 0.1.1
File Size Uploaded Provenance
holocron_ai-0.1.1.tar.gz 12.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for holocron-ai 0.1.1
File Interpreter ABI Platform
holocron_ai-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / holocron_ai-0.1.1.tar.gz

Download URL holocron_ai-0.1.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3d483fa2f3dbc8310b18d9a331af527b11cfe04933413511b8cec968d34db356
BLAKE2b-256 checksum
How to use checksums
e2fe2cc9e019b795bdef44f0947f2f77f279805eb473e7c036f01d5207c18597
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / holocron_ai-0.1.1-py3-none-any.whl

Download URL holocron_ai-0.1.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a79e75986441c7d73eceb3b0da0477868014cbfb3d028ef7842571f034a6170
BLAKE2b-256 checksum
How to use checksums
67a86e56e69ffdc59f417f7270548c090380f2a67a67e2d67ccb21687973d37b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for holocron-ai 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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