Skip to content

A barebone Chatbot built using FastAPI websockets and HTML - powered by Github Models

Notifications You must be signed in to change notification settings

rihoneailabs/trae-chat-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Screenshot

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:

    git clone https://github.com/rihoneailabs/trae-chat.git
    cd trae-chat
  2. Install the required dependencies:

    pip install -r requirements.txt

Running the Application

  1. Start the FastAPI server:

    python main.py

    Or alternatively:

    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 logic
  2. 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.

About

A barebone Chatbot built using FastAPI websockets and HTML - powered by Github Models

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published