Find answers from the community

Updated 3 months ago

my code to load was working jsut fine in

my code to load was working jsut fine in a code sample but now I am seeing this error, please help debug.
Plain Text
import nest_asyncio
from llama_index.core.extractors import TitleExtractor, QuestionsAnsweredExtractor
from llama_index.core.node_parser import TokenTextSplitter

nest_asyncio.apply()

# Configure text splitter
text_splitter = TokenTextSplitter(separator=" ", chunk_size=512, chunk_overlap=128)

# Load documents
documents = SimpleDirectoryReader("data/pdf").load_data()
storage_context = StorageContext.from_defaults(vector_store=vector_store)

# Create index
index = VectorStoreIndex.from_documents(documents, transformations=[text_splitter], storage_context=storage_context)
``

ImportError: llama-index-readers-file package not found
W
L
2 comments
You'll need to install the file package.
pip install llama-index-readers-file
(You might also need -U to update)
Add a reply
Sign up and join the conversation on Discord