EasyChat is a local chatbot web application built with Flask and React. It offers a delightful and modern interface for interacting with a language model (LLM) API of your choice. With its streamlined conversation management and real-time streaming capabilities, EasyChat is perfect for local experimentation and development.
EasyChat is designed to help you set up a local chatbot that communicates with any LLM API seamlessly. The app features a clean separation between the frontend and backend, ensuring ease of customization and extension. Whether you're a developer experimenting with LLMs or looking for a personal chatbot, EasyChat has you covered.
- 💬 Chat Interface: Enjoy a dynamic, real-time chat experience with a modern React-based UI.
- 🗂️ Conversation Management: Easily create, rename, and delete chats.
- ⚙️ Customizable API Settings: Configure your LLM API (base URL, API key, model, temperature, top_p) directly from the user interface.
- 🖥️ Local Deployment: Perfect for Linux-based development environments.
Follow these steps to install and run EasyChat on your Linux system.
Ensure that you have the following installed:
- Git
- Node.js and npm
- Python 3
- pip
Open your terminal and run:
git clone https://github.com/kaikaiyao/EasyChat.git
cd EasyChat
Navigate to the frontend
directory, install the npm dependencies, and build the project:
cd frontend
npm install
npm run build
Navigate to the backend
directory and install the required Python packages:
cd backend
pip install -r requirements.txt
By default, the Flask app runs on port 5000. For local development, run:
python easy_chat.py
Now, open your browser and navigate to:
http://localhost:5000
You should see the EasyChat interface, ready for you to start chatting!
EasyChat allows you to configure your LLM API settings via the Settings panel on the right side of the GUI. Fill in your API details or import them via a JSON file, then click Save.
Below is an example JSON file for importing your settings. Save this as settings.json
and use the import feature in the Settings panel.
{
"base_url": "https://api.openai.com/v1",
"api_key": "your-api-key-here",
"model": "gpt-3.5-turbo",
"temperature": 0.6,
"top_p": 0.7
}
All chat history in EasyChat is stored locally as JSON files. These files are saved in the data
directory located in the backend
folder. Each conversation is stored in its own file, named using the conversation's unique ID (e.g., backend/data/<conversation_id>.json
).
If you need to review or back up your chat logs, simply navigate to the backend/data
directory on your system. Note that deleting a conversation from the EasyChat interface will also remove its corresponding file from this directory.
Contributions are welcome! If you have suggestions for improvements or encounter issues, please open an issue or submit a pull request.
For any questions, feedback, or collaboration inquiries, please contact:
Kai Yao
School of Informatics, University of Edinburgh
📧 kai.yao@ed.ac.uk