React frontend with Python fastapi backend for rapid testing, prompt engineering, and task automation at low cost
- Copy example .env file in /backend and set OPENAI_API_KEY
# Linux
$ cp .env.example .env
- From the root folder run
$ docker-compose up --build
- Install Python
- Clone This Repo
- Get yarn (Mac: https://tecadmin.net/install-yarn-macos/)
$ brew install yarn
- Build python venv
# Linux
$ python -m venv venv
$ . venv/bin/activate
- Install requirements.txt
$ pip install -r requirements.txt
- Copy example .env file and set OPENAI_API_KEY
# Linux
$ cp .env.example .env
- Launch fastapi
$uvicorn main:app
- Link for API testing
http://127.0.0.1:8000/docs
- Launch seperate terminal
- Navigate to frontend and launch react
$yarn start
Frontend: https://github.com/FredrikOseberg/chatbot-tutorial
Backend: https://github.com/oikosohn/openai-quickstart-fastapi