A FastAPI-based backend for a chatbot application.
- Create and activate virtual environment:
python3.11 -m venv .venv
source .venv/bin/activate- Install dependencies:
pip3 install -r requirements.txt- Start the server:
fastapi dev main.py- The API will be available at
http://localhost:8000
- Start the server:
uvicorn main:app --host 0.0.0.0 --port 8000- In a new terminal window, start ngrok:
ngrok http 8000
GET /: Welcome messageGET /webhook: Webhook
Once the server is running, you can access:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc