๐ AI-powered chatbot for window/door sales industry. It handles initial customer contact before they reach a salesperson.
I want to help salespeople in window industry by:
- 24/7 availability for customers
- Reducing workload of sales staff
- Automating measurement appointments
- Providing instant product information
- AI-powered natural conversations
- Python 3.12 - Backend programming language
- FastAPI - REST API framework
- Uvicorn - ASGI server
- OpenAI GPT-4o-mini - Artificial intelligence
- HTML/CSS/JavaScript - Frontend interface
- python-dotenv - Environment variables management
- Python environment setup
- Project structure
- intents.json with 6 categories
- Pattern matching logic
- Console version (chatbot.py)
- FastAPI integration
- Endpoints: /, /chat, /info, /clear
- Auto documentation at /docs
- CORS enabled for frontend
- Session-based conversation memory
- HTML chat interface
- JavaScript API integration
- Real-time bot responses
- Clickable links support
- New conversation button
- GPT-4o-mini model connected
- Natural language understanding
- Context-aware responses
- Company knowledge base (wafam_oferta.txt)
- Text chunking (56 fragments)
- OpenAI embeddings (text-embedding-3-small)
- ChromaDB vector database
- Semantic search
- Conversation memory
- Topic tracking
- Optimized token usage
- Conversation logging
- Lead collection
- Admin panel
- Deployment to cloud
git clone https://github.com/Kajhol/window-sales-chatbot.git
cd window-sales-chatbotpython -m venv venvWindows CMD:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
venv\Scripts\activatepip install fastapi uvicorn openai python-dotenv langchain langchain-openai langchain-community chromadbCreate file .env in window-sales-chatbot folder:
OPENAI_API_KEY=your-api-key-here
Get your API key from: https://platform.openai.com/api-keys
cd window-sales-chatbot/src
python prepare_knowledge.py
python build_vectordb.pycd window-sales-chatbot/src
uvicorn api:app --reloadOpen in browser: window-sales-chatbot/frontend/index.html
Questions or code review? Find me here:
- LinkedIn: https://www.linkedin.com/in/kajetan-hoลdan-9b4a503a0/
- Author: Kajhol (Computer Science Student, Silesian University of Technology, 3rd year)
Star this repo to follow progress!