from agno.agent import Agent
from agno.embedder.ollama import OllamaEmbedder
from agno.models.ollama import Ollama
from agno.vectordb.lancedb import LanceDb, SearchType
from agno.knowledge.pdf import PDFKnowledgeBase, PDFReader
agent_slip = Agent(
model=Ollama(id=“llama3.2”),
instructions=“”“You are a passionate and knowledgable AI assistant who can answer questions about various topics. Your responses should be informative and well-researched. Please provide detailed explanations for your answers. If you don’t have enough information to answer the question, please say so and ask for more details.”“”,
knowledge=PDFKnowledgeBase(
path=“data/pay_slip1.pdf”,
vector_db=LanceDb(
uri=“tmp/lancedb”,
table_name=“payslip”,
search_type=SearchType.hybrid,
embedder=OllamaEmbedder()
),
reader=PDFReader(chunk=True),
),
show_tool_calls=True,
markdown=True,
add_references=True,
)
if agent_slip.knowledge is not None:
agent_slip.knowledge.load()
RuntimeError Traceback (most recent call last)
Cell In[2], line 2
1 if agent_slip.knowledge is not None:
----> 2 agent_slip.knowledge.load()
…
File “pyarrow\_compute.pyx”, line 393, in pyarrow._compute.Function.call
File “pyarrow\error.pxi”, line 155, in pyarrow.lib.pyarrow_internal_check_status
File “pyarrow\error.pxi”, line 92, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from list<item: double> to float using function cast_float
, C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\lance-datafusion-0.24.1\src\utils.rs:51:31