- Create a virtual environment and activate it
python -m venv venv
source venv/bin/activate
- Install the dependencies
pip install -r requirements.txt-
(Optional) We use Phoenix by Arize for tracing. If you want to use it, either use the Cloud version or self-host it.
-
Create a
.envfile in the root of the project and add the following variables:
OPENAI_API_KEY=your_openai_api_key
PHOENIX_API_KEY=your_phoenix_api_key (optional, if you use phoenix)
PHOENIX_ENDPOINT=your_phoenix_endpoint (optional, only required if you add [authentication](https://arize.com/docs/phoenix/authentication) to your Phoenix instance)
ENV=development (optional, defaults to development)
- Initialize the database
python init.pycd src; uvicorn main:app --reload --port 8002You can now access the API at http://localhost:8002