Skip to content

Latest commit

Β 

History

History
123 lines (92 loc) Β· 3.92 KB

File metadata and controls

123 lines (92 loc) Β· 3.92 KB

πŸ€– Auto Chat πŸ€–

An AI vs. AI conversation simulator built with Tkinter.

Python Version License: MIT Issues Forks Stars

Engage two AI personas in turn-based conversations using various Large Language Models (LLMs).


🌟 Features

  • πŸ—£οΈ Dual AI Conversations: Pit two distinct AI personas against each other.
  • πŸ”Œ Multi-LLM Support: Integrates with Ollama, LM Studio, OpenRouter, and OpenAI APIs.
  • 🎭 Persona Management: Easily create, edit, and manage AI personalities.
  • 🎨 Modern GUI: Built with Tkinter and styled with ttkbootstrap for a clean look.
  • πŸ’Ύ Conversation Logging: Save and export chat transcripts.
  • 🎀 Narrator Mode: Interject system messages or context into the conversation.
  • 🎯 Topic Control: Guide the conversation with specific topics.
  • βš™οΈ Persistent Configuration: Saves your settings and API keys.
  • πŸ–₯️ CLI Mode: Run conversations from the terminal with cli_chat.py.

πŸ› οΈ Requirements

  • Python 3.8+
  • Tkinter & ttk (usually included with Python)
  • ttkbootstrap
  • requests
  • python-dotenv
  • rich (for the Persona Generator)

πŸš€ Installation

Click to expand installation steps
  1. Clone the repository:

    git clone https://github.com/rustyorb/auto_chat.git
    cd auto_chat

    Or download the source code ZIP.

  2. Create and activate a virtual environment:

    # Create virtual environment
    python -m venv venv
    
    # Activate virtual environment
    # On Windows:
    .\venv\Scripts\activate
    # On macOS/Linux:
    source venv/bin/activate

    Note: Using a virtual environment is highly recommended!

  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up personas.json:

    # Copy the example personas file
    cp personas.json.example personas.json

    (Alternatively, rename personas.json.example to personas.json manually)

  5. Set up config.json:

    # Copy the example config file
    cp config.json.example config.json

    (Alternatively, rename config.json.example to config.json manually)

    ✨ The example files provide a great starting point. Edit them directly or use the app's interface!


▢️ Usage

πŸ’¬ Main Application (auto_chat.py)

  1. Ensure your virtual environment is activated (source venv/bin/activate or .\venv\Scripts\activate).
  2. Launch the application:
    python auto_chat.py
  3. Setup Screen:
    • πŸ‘€ Select two personas.
    • ☁️ Choose API providers and models for each.
    • πŸ”’ Set the max number of conversation turns.
    • πŸ“ Enter a conversation topic.
  4. During Conversation:
    • ⏯️ Pause/Resume
    • πŸ“’ Add Narrator Messages
    • ⏹️ Stop Conversation
    • πŸ“„ Save Log

πŸ§‘β€πŸŽ¨ Persona Generator (persona_generator.py)

A handy tool for crafting new AI personalities:

python persona_generator.py