Cannot use PgVector as vector_db in PDFKnowledgeBase

This code, which is given in documentations

from phi.knowledge.pdf import PDFKnowledgeBase, PDFReader
from phi.agent import Agent
from agno.vectordb.pgvector import PgVector

pdf_knowledge_base = PDFKnowledgeBase(
    path="/home/alex/Documents/cc.pdf",
    vector_db=PgVector(
        table_name="alex_cv",
        db_url="postgresql+psycopg://admin:secret@localhost:6432/chatbot",
    ),
    reader=PDFReader(chunk=True),
)

agent = Agent(
    knowledge=pdf_knowledge_base,
    search_knowledge=True,
)
agent.knowledge.load(recreate=False)

agent.print_response("What is Alex's last name?")

when running

/var/www/html/chatbot/.venv/bin/python3.12 /var/www/html/chatbot/cv.py

has this error

pydantic_core._pydantic_core.ValidationError: 1 validation error for PDFKnowledgeBase
vector_db
  Input should be an instance of VectorDb [type=is_instance_of, input_value=<agno.vectordb.pgvector.p...bject at 0x736c12737230>, input_type=PgVector]
    For further information visit https://errors.pydantic.dev/2.10/v/is_instance_of

while PgVector inherits VectorDb

Hi @stallman
Thanks for reaching out and for using Agno! I’ve looped in the right engineers to help with your question. We usually respond within 48 hours, but if this is urgent, just let us know, and we’ll do our best to prioritize it.
Appreciate your patience—we’ll get back to you soon! :smile:

Hey @stallman sorry about it but seems like you’re using a mix of phi and ag. Please upgrade it to Agno and use: from agno.knowledge.pdf import PDFKnowledgeBase, PDFReader and from agno.agent import Agent .