Skip to main content

Code

cookbook/models/cerebras/basic_knowledge.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Set your API key

3

Install libraries

4

Start your Postgres server

Ensure your Postgres server is running and accessible at the connection string used in db_url.
5

Run Agent (first time)

The first run will load and index the PDF. This may take a while.
6

Subsequent Runs

After the first run, comment out or remove knowledge_base.load(recreate=True) to avoid reloading the PDF each time.