This is a Python FastAPI application that return OpenAI's response has a stream of Server-Sent Events.
Install the dependencies:
poetry install
Before running the application or the tests, copy .env.example
to .env
and fill in the appropriate values:
cp .env.example .env
To run the application:
poetry run uvicorn app.main:app
This will start a development server at http://localhost:8000/
.
To run the tests:
poetry run pytest