Skip to content

v1.4.6

Compare
Choose a tag to compare
@dirkbrnd dirkbrnd released this 10 May 21:38
· 409 commits to main since this release
bf1462a

Changelog

New Features:

  • Cerebras Model Provider: Added Cerebras as a model provider.
  • Claude Web Search: Added support for Claude’s new web search tool.
  • Knowledge Base Metadata Filtering (Beta): Added support for filtering documents by metadata
    • Two Ways to Apply Filters:

      • Explicit Filtering: Pass filters directly to Agent or during run/query

        # Option 1: Filters on Agent initialization
        agent = Agent(
        					knowledge=knowledge_base, 
        					knowledge_filters={"filter_1": "abc"}
        				)
             
        # Option 2: Filters on run execution
        agent.run("Tell me about...", knowledge_filters={"filter_1": "abc"})

        See docs here

      • Agentic Filtering: Agent automatically detects and applies filters from user queries

        # Enable automatic filter detection
        agent = Agent(
        					knowledge=knowledge_base, 
        					enable_agentic_knowledge_filters=True
        				)
             
        # Agent extracts filters from query
        agent.run("Tell me about John Doe's experience...")

        See docs here

    • Two approaches for adding metadata to documents:

      1. During Knowledge Base Initialization:

        knowledge_base = PDFKnowledgeBase(path=[
             {
        		     "path": "file_1.pdf", 
        		     "metadata": {
        				     "user_id": "abc"
        				  }
        		 },
        		 {
        		     "path": "file_2.pdf", 
        		     "metadata": {
        				     "user_id": "xyz"
        				  }
        		 }
        ])
      2. During Individual Document Loading:

        knowledge_base.load_document(
             path="file.pdf",
             metadata={"user_id": "abc"}
        )
    • Compatibility

      • Knowledge Base Types: PDF, Text, DOCX, JSON, and PDF_URL
      • Vector Databases: Qdrant, LanceDB, and MongoDB

Improvements:

  • User and Session ID in Tools: Added current_user_id and current_session_id as default variables in session_data.

Bug Fixes:

  • Knowledge Base ID Clashes: Knowledge files with overlapping names (e.g., abc.-.xyz.pdf and abc.-.def.pdf) were being incorrectly identified due to the readers using formatted names as unique id which were getting uniqueness conflict. Introduced a unique ID for each document in all the readers using uuidv4() to ensure strict identification and prevent conflicts.

What's Changed

Full Changelog: v1.4.5...v1.4.6