This is a Retro style Django-based chatbot web application that integrates with OpenAI models via OpenRouter. It features user registration, login, and a simple chat interface.open coode from livikit
- User registration and authentication
- Chat interface powered by OpenAI (via OpenRouter)
- Stores chat history (if enabled)
- Python 3.10+
- Django 4.x or 5.x
openai
Python package
-
Clone the repository
git clone <your-repo-url> cd DjAI/chatbot
-
Create and activate a virtual environment (optional but recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install django openai
-
Set up environment variables
- Set your OpenAI/OpenRouter API key in your environment or directly in
views.py
(not recommended for production).
- Set your OpenAI/OpenRouter API key in your environment or directly in
-
Apply migrations
python manage.py migrate
-
Run the development server
python manage.py runserver
-
Access the app
- Open your browser and go to http://127.0.0.1:8000/
- Register a new user account.
- Log in with your credentials.
- Start chatting with the AI in the chat interface.