Skip to content

Latest commit

 

History

History

assistants

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Assistants Cookbook

Phidata Assistants add memory, knowledge and tools to LLMs. Let's test out a few examples.

  • Create a virtual environment
python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate
  • Install libraries
pip install -U phidata openai

Assistants

  • Basic Assistant
python cookbook/assistants/basic.py

Assistants with Tools

  • Data Analyst Assistant
pip install -U duckdb
python cookbook/assistants/data_analyst.py
  • Web Search Assistant
pip install -U duckduckgo-search
python cookbook/assistants/web_search.py
  • Python Assistant
python cookbook/assistants/python_assistant.py

Run PgVector

Install docker desktop first.

  • Run using a helper script
./cookbook/run_pgvector.sh
  • OR run using the docker run command
docker run -d \
  -e POSTGRES_DB=ai \
  -e POSTGRES_USER=ai \
  -e POSTGRES_PASSWORD=ai \
  -e PGDATA=/var/lib/postgresql/data/pgdata \
  -v pgvolume:/var/lib/postgresql/data \
  -p 5532:5432 \
  --name pgvector \
  phidata/pgvector:16

Assistants with Knowledge

  • Install libraries
pip install -U sqlalchemy pgvector "psycopg[binary]" pypdf
  • RAG Assistant
python cookbook/assistants/rag_assistant.py
  • Autonomous Assistant
python cookbook/assistants/auto_assistant.py

Assistants with Storage, Knowledge & Tools

  • PDF Assistant
python cookbook/assistants/pdf_assistant.py