Find answers from the community

Updated 2 months ago

Hey I m using a PDF data loader with

Hey I'm using a PDF data loader with llama_index and then converting that to GPTSimpleVectorIndex, but get this error:
Invalid document type: <class 'gpt_index.readers.schema.base.Document'>.
it was working fine before, but has been failing with gpt_index, llama_index
cc
I
j
11 comments
for context i'm importing loaders using this
from llama_index import download_loader
give me one sec
which part is failing for you? the download or the import into vector idnex?
download is failing with:
File "/usr/local/lib/python3.8/site-packages/llama_index/readers/download.py", line 110, in download_loader
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File ".modules/file-pdf.py", line 6, in <module>
from gpt_index.readers.base import BaseReader
try refresh_cache=True
this is because the file is cached, it got updated
in the download_loader call
where do i set refresh_cache=True ?
download_loader(..., refresh_cache=True)
Add a reply
Sign up and join the conversation on Discord