This is a barebone python flask app with POST endpoint for returning dummy response to user prompts in my chatbot-react-app repo.
- Clone the repository.
git clone https://github.com/ganeshcodes/chatbot-python-backend.git
- Install dependencies using pip.
pip3 install -r requirements.txt
- Start the development server.
python3 app.py
- POST http://localhost:5000/chat is now available.
- Send a message from ChatBot React App running on http://localhost:3000.
- Send multiple long messages to check text wrap and scroll bar appearance as messages fill the screen space.
- Fill in desired logic for getting the real useful response for user prompt (RAG/LangChain/LLMs interaction). - this part would go in separate project or branch to keep this to bare minimum.
- API accepts all origins requests with current CORS setup.
- This can be tested sepately using Chrome REST plugin to send HTTP POST request.
- While there are other ways of creating this end point, I prefer python as preferred language for last point mentioned in Usage section.