Code
db.py
Ensure Postgres database is running.
Usage
1
Set up your virtual environment
2
Install dependencies
3
Start Postgres database
4
Start vLLM server
5
Set your API key
6
Run Agent
Save the code above as
db.py, then run:Persist chat history for a vLLM agent with PostgresDb.
Set up your virtual environment
Install dependencies
Start Postgres database
Start vLLM server
Set your API key
Run Agent
db.py, then run: