Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
OpenRouter provides access to multiple AI models including free options like Gemini and Llama. The free tier is sufficient to run SeanceAI.

Installation Steps

1

Clone the repository

Clone the SeanceAI repository to your local machine:
git clone https://github.com/ARJUNVARMA2000/Seance_AI.git
cd Seance_AI
2

Create a virtual environment

Create and activate a Python virtual environment to isolate dependencies:
python -m venv venv
source venv/bin/activate
You should see (venv) appear at the start of your terminal prompt, indicating the virtual environment is active.
3

Install dependencies

Install all required Python packages using pip:
pip install -r requirements.txt
This will install the following packages:
  • flask==3.0.0 - Web framework
  • gunicorn==21.2.0 - Production WSGI server
  • gevent==24.2.1 - Async support for streaming
  • requests==2.31.0 - HTTP library for API calls
  • python-dotenv==1.0.0 - Environment variable management
4

Configure environment variables

Create a .env file in the project root directory and add your OpenRouter API key:
echo OPENROUTER_API_KEY=your_key_here > .env
Replace your_key_here with your actual OpenRouter API key. Never commit your .env file to version control.
See the Configuration page for more environment variable options.
5

Run the development server

Start the Flask development server:
python app.py
You should see output similar to:
* Running on http://0.0.0.0:5000
* Debug mode: off
6

Access the application

Open your web browser and navigate to:
http://localhost:5000
You should now see the SeanceAI interface and be able to start conversations with historical figures!

Verifying the Installation

To verify that everything is working correctly:
  1. Check the health endpoint: Visit http://localhost:5000/api/health in your browser
  2. View available figures: Visit http://localhost:5000/api/figures to see the list of historical figures
  3. Test a conversation: Select a historical figure and send a message
If you encounter any issues, check that:
  • Your Python version is 3.11 or higher (python --version)
  • The virtual environment is activated
  • Your OpenRouter API key is correctly set in the .env file
  • Port 5000 is not being used by another application

Next Steps

Build docs developers (and LLMs) love