Example of FastAPI for web-based RAG using Haystack.
The component that searches on the web uses the googlesearch library, which will return 429 errors if used too much in a short period of time (related issue: here)
- Clone this repository.
- Install the required Python packages by running
pip install -r requirements.txt, oruv sync. - Set your
OPENAI_API_KEYenvironment variable to your OpenAI API key.
Run the app with
python -m uvicorn app.main:appor with just run dev.