Skip to main content
The PDFBytesKnowledgeBase reads PDF content from bytes or IO streams, converts them into vector embeddings and loads them to a vector database. This is useful when working with dynamically generated PDFs, API responses, or file uploads without needing to save files to disk.

Usage

We are using a local LanceDB database for this example. Make sure it’s running
knowledge_base.py

Params

PDFBytesKnowledgeBase is a subclass of the AgentKnowledge class and has access to the same params.

Developer Resources