Code
db.py
Usage
1
Set up your virtual environment
2
Install LM Studio
Install LM Studio from here and download the
model you want to use.
3
Install dependencies
4
Run PgVector
5
Run Agent
Save the code above as
db.py, then run:Persist an LMStudio agent’s chat history to PostgreSQL and give it web search tools with add_history_to_context enabled.
Set up your virtual environment
Install LM Studio
Install dependencies
Run PgVector
Run Agent
db.py, then run: