Skip to main content

Code

knowledge.py

Usage

1

Set up your virtual environment

2

Set your API key

3

Install dependencies

4

Run PgVector

5

Run Agent (first time)

The first run will load and index the PDF. This may take a while. Save the code above as knowledge.py, then run:
6

Subsequent Runs

After the first run, comment out or remove the knowledge.insert(...) call to avoid reloading the PDF each time.