This repo contains a POC that implements a streaming of the response from an LLM back to a frontend (via a middle backend (kinda proxy)).
This POC will spin up 3 servers:
- Frontend written in React
- Backend using ExpressJS
- API written in Python using FastAPI
To set up the project and spin up the containers:
- Configure the
api/app/.env
by taking a look at the.env.example
- Run
docker compose up --build
In VSCode, To have locally intellisense:
-
Setup the local python environment:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r api/app/requirements.txt
(Reload the VSCode window)
-
Install Node dependencies:
- Inside
backend/app
runnpm i
- Inside
frontend/app
runnpm i
- Inside