A Flask-based web application providing an AI-powered chat interface with a seamless user experience. The backend integrates an external AI API, processes responses, and delivers structured outputs in a real-time chat format.
- Send messages and receive AI-generated responses.
- Real-time conversation with dynamic UI updates.
- User and AI messages visually distinguished for clarity.
- Fetches responses from an external AI API.
- Processes responses to enhance readability and formatting.
- Removes unwanted characters, emojis, and applies markdown styling.
- Direct API access for developers.
- Supports both GET and POST requests for message queries.
- Returns structured JSON responses for easy integration.
Ensure the following dependencies are installed:
pip install flask requests
1. Clone the repository:
git clone https://github.com/starexxx/AI.git
cd AI
2. Start the Flask server:
python app.py
3. Open your browser and visit:
http://127.0.0.1:50000
Navigate to the chat UI in your browser.
Type a message in the input field and press send.
The AI response appears instantly in the chat window.
Fetch AI-generated responses programmatically.
GET Request:
curl http://127.0.0.1:50000/chat/Hello
Response:
{
"Starexx": "Hello! How can I assist you today?"
}
POST Request:
curl -X POST http://127.0.0.1:50000/chat -H "Content-Type: application/json" -d '{"message": "Hello"}'
Response:
{
"Starexx": "Hello! How can I assist you today?"
}
Project Structure
└── Starexx AI/
├── .github
│ │ └── workflows
│ │ └── python-package.yml
│ └── ISSUE_TEMPLATE
│ └─ bug_report.md
├── src
│ └── app.py
├── LICENSE
├── README.md
├── requirements.txt
└── vercel.json
License
This project is open-source and available for modification under the MIT license.