This repo contains a sample RAG system using hatchet to deal with the batch processing and execution.
This code will:
- reads a website and parses the text content
- reasons about what information is most relevant to the user request
- generates a response for the user
This repo contains:
- Frontend react application
- FastAPI that will act as our edge service
- Hatchet worker
In order to execute this code you need to have:
- poetry
- npm
- Hatchet
- docker
- docker-compose
- Ollama
Before building and running the application make sure to start docker and create a API token,
Create a .venv file based on .venv-example including your generated token
In order to install required packages run the following command
poetry installThis will install the required packages
Start the API with
poetry run apiIn a different Terminal start the hatchet worker with
poetry run hatchetIn another terminal go to the frontend folder and start with
npm startYou can now use http://localhost:3000 and test the query and http://localhost:8080 to view the execution status of the workflow.
This application is based on the tutorial https://docs.hatchet.run/home/tutorials/fastapi-react/project-setup with minor changes to use ollama.