https://github.com/rihoneailabs/trae-chat-101
A barebone Chatbot built using FastAPI websockets and HTML - powered by Github Models
https://github.com/rihoneailabs/trae-chat-101
azure-ai fastapi github-models trae-ide websockets
Last synced: 7 months ago
JSON representation
A barebone Chatbot built using FastAPI websockets and HTML - powered by Github Models
- Host: GitHub
- URL: https://github.com/rihoneailabs/trae-chat-101
- Owner: rihoneailabs
- Created: 2025-03-01T13:12:08.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T13:25:53.000Z (7 months ago)
- Last Synced: 2025-03-01T14:23:46.706Z (7 months ago)
- Topics: azure-ai, fastapi, github-models, trae-ide, websockets
- Language: HTML
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Trae Chat
Trae Chat is a real-time chat application built with FastAPI and WebSocket, featuring a modern and responsive user interface. This project demonstrates how to create a simple chatbot interface with real-time communication capabilities.

## Features
- Real-time messaging using WebSocket
- Clean and modern user interface
- Responsive design that works on both desktop and mobile
- Simple bot responses to user messages
- Message history tracking## Prerequisites
Before you begin, ensure you have Python 3.7+ installed on your system.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/rihoneailabs/trae-chat.git
cd trae-chat
```2. Install the required dependencies:
```bash
pip install -r requirements.txt
```## Running the Application
1. Start the FastAPI server:
```bash
python main.py
```
Or alternatively:
```bash
uvicorn main:app --reload
```2. Open your web browser and navigate to:
```
http://localhost:8000
```## Project Structure
```
.
├── main.py # FastAPI application and WebSocket endpoints
├── requirements.txt # Python dependencies
├── static/ # Static files directory
│ └── index.html # Frontend chat interface
└── README.md # Project documentation
```## Development
The application consists of two main components:
1. Backend (main.py):
- FastAPI server handling WebSocket connections
- Chat history management
- Bot response logic2. Frontend (static/index.html):
- Modern chat interface
- Real-time message updates
- WebSocket client implementation## License
This project is open-source and available under the MIT License.
## Acknowledgments
Built with Trae IDE - A powerful AI-powered development environment.