https://replit.com/@HappyHappy19/chatbotapi
Ensure you have the following installed:
- Python (>=3.10)
- pip (package installer for Python)
- Poetry
-
Clone the repository:
git clone <url> cd customer-support-chatbot
-
Install the required Python packages using Poetry:
poetry install or pip install fastapi uvicorn spacy
-
Run the app:
uvicorn main:app --reload
If you prefer using Docker, you can pull the Docker image and run the application in a container:
-
Pull the Docker image:
docker build -t chatbotapi .
-
Run the Docker container:
docker run -p 8000:8000 chatbotapi
This FastAPI app provides two endpoints:
/chat (POST): Accepts a JSON payload with a "message" field and returns the chatbot's response. /faqs (GET): Returns the first 5 FAQs from the loaded FAQ list.
You can test the API using tools like curl, Postman, or by creating a simple frontend application that makes requests to these endpoints.
Contributions are welcome! Here's how you can contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/improvement
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/improvement
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.