- Python 100%
| .env | ||
| chainlit.md | ||
| LICENSE | ||
| main.py | ||
| prompts.json | ||
| README.md | ||
| requirements.txt | ||
🤖 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
-
Clone the repository:
git clone https://git.server.wales/thomas/AI_Debate_Bot.git -
Set your environment variables:
Edit .env file with OpenAI compatible API settings.
-
Setup Python Virtual environment (optional but recommended):
Create the environment (run inside base directory):
python -m venv .venvActivate the environment (linux):
source .venv/bin/activateActivate the environment (windows):
.venv\Scripts\activate -
Install requirements:
pip install -r requirements.txt -
Start the server:
chainlit run main.py -w