This is a Flask-based chat application that allows users to interact with various AI language models. Users can create multiple chats, switch between them, and customize chat settings.
- Create and manage multiple chat sessions
- Support for different AI models (GPT-4, Claude, etc.)
- Real-time chat interface
- Dark mode toggle
- Chat context and artifact management
- Responsive design
- Python 3.7+
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/md-experiments/simple-chat cd simple-chat
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the required packages:
pip install -r requirements.txt
-
Copy the
.env.example
file to.env
and fill in your API keys and other configuration:cp .env.example .env
-
Start the Flask application:
python app.py
-
Open a web browser and navigate to
http://127.0.0.1:5001
-
Create a new chat by clicking the "New Chat" button and selecting an AI model.
-
Start chatting with the AI by typing messages in the input field and pressing Enter or clicking Send.
-
Use the sidebar to switch between different chats or create new ones.
-
Click the cog icon next to a chat to modify its settings or add artifacts.
-
Toggle dark mode using the switch in the sidebar.
app.py
: Main Flask application filellm.py
: Contains the logic for interacting with AI language modelsstatic/
: Contains static files (CSS, JavaScript)templates/
: Contains HTML templatesdata/
: Stores chat data as JSON files
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Flask
- OpenAI GPT
- Anthropic Claude
- Bootstrap
If you encounter any problems or have any questions, please open an issue in the GitHub repository.