No description
Find a file
2026-05-04 13:37:55 +01:00
.env Initial Commit 2026-05-04 13:37:55 +01:00
chainlit.md Initial Commit 2026-05-04 13:37:55 +01:00
LICENSE Initial Commit 2026-05-04 13:37:55 +01:00
main.py Initial Commit 2026-05-04 13:37:55 +01:00
prompts.json Initial Commit 2026-05-04 13:37:55 +01:00
README.md Initial Commit 2026-05-04 13:37:55 +01:00
requirements.txt Initial Commit 2026-05-04 13:37:55 +01:00

🤖 AI Debate Arena (Chainlit Implementation)

An automated, multi-turn debate engine built with Python and Chainlit. This engine simulates an intellectual clash between two distinct personas—the Analyst (logical/structural) and the Skeptic (empirical/data-driven)—to reach a consensus or hit a predefined turn limit.

Features

  • Automated Loop: The debate continues autonomously without user intervention until agreement is reached or the turn limit is hit.
  • Dynamic Personas:
    • Analyst: Focuses on logic, structure, and long-term implications.
    • Skeptic: Focuses on empirical data, contradictions, and immediate evidence.
  • Real-Time UI: Powered by Chainlit, featuring real-time message updates (msg.update()) to simulate "live" typing and thinking delays.
  • Interactive Settings: Includes a Chainlit sidebar with a Fast Mode toggle to disable all simulated human delays for rapid debate.
  • Smart Termination: The engine detects consensus by parsing the transcript for role-specific agreement triggers (e.g., Skeptic: ... agreement reached).

🛠️ Tech Stack

  • Framework: Chainlit (Asynchronous UI/State Management)
  • LLM Integration: OpenAI API (Compatible with local providers like Ollama or LM Studio)
  • Language: Python 3.10+

🚀 Getting Started

Prerequisites

  • Python installed on your machine.
  • An OpenAI-compatible API endpoint (Local or Cloud).

Installation

  1. Clone the repository: git clone https://git.server.wales/thomas/AI_Debate_Bot.git

  2. Set your environment variables:

    Edit .env file with OpenAI compatible API settings.

  3. Setup Python Virtual environment (optional but recommended):

    Create the environment (run inside base directory): python -m venv .venv

    Activate the environment (linux): source .venv/bin/activate

    Activate the environment (windows): .venv\Scripts\activate

  4. Install requirements: pip install -r requirements.txt

  5. Start the server: chainlit run main.py -w