Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 1.18 KB

File metadata and controls

24 lines (20 loc) · 1.18 KB

ChatBot Python Flask Backend

This is a barebone python flask app with POST endpoint for returning dummy response to user prompts in my chatbot-react-app repo.

Usage

  1. Clone the repository.
    git clone https://github.com/ganeshcodes/chatbot-python-backend.git
  2. Install dependencies using pip.
    pip3 install -r requirements.txt
  3. Start the development server.
    python3 app.py
  4. POST http://localhost:5000/chat is now available.
  5. Send a message from ChatBot React App running on http://localhost:3000.
  6. Send multiple long messages to check text wrap and scroll bar appearance as messages fill the screen space.
  7. 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.

Note

  1. API accepts all origins requests with current CORS setup.
  2. This can be tested sepately using Chrome REST plugin to send HTTP POST request.
  3. While there are other ways of creating this end point, I prefer python as preferred language for last point mentioned in Usage section.