You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed:
pip install llama-index-core
pip install llama-index-embeddings-llamafile llama-index-llms-llamafile llama-index-readers-web
next created file LlamaIndex.py:
from llama_index.core import Settings
from llama_index.embeddings.llamafile import LlamafileEmbedding
from llama_index.llms.llamafile import Llamafile
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core import SimpleDirectoryReader
local_doc_reader = SimpleDirectoryReader(input_dir='/home/rodomb/data')
docs = local_doc_reader.load_data(show_progress=True)
Next in command line I put: # python3 LlamaIndex.py
and unfortunately I received errors:
Loading files: 0%|
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 52, in _try_loading_included_file_formats
from llama_index.readers.file import (
ModuleNotFoundError: No module named 'llama_index.readers.file'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "LlamaIndex.py", line 28, in
docs = local_doc_reader.load_data(show_progress=True)
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 700, in load_data
SimpleDirectoryReader.load_file(
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 518, in load_file
default_file_reader_cls = SimpleDirectoryReader.supported_suffix_fn()
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 67, in _try_loading_included_file_formats
raise ImportError("llama-index-readers-file package not found")
ImportError: llama-index-readers-file package not found
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I installed:
pip install llama-index-core
pip install llama-index-embeddings-llamafile llama-index-llms-llamafile llama-index-readers-web
next created file LlamaIndex.py:
from llama_index.core import Settings
from llama_index.embeddings.llamafile import LlamafileEmbedding
from llama_index.llms.llamafile import Llamafile
from llama_index.core.node_parser import SentenceSplitter
Settings.embed_model = LlamafileEmbedding(base_url="http://localhost:8080")
Settings.llm = Llamafile(
base_url="http://localhost:8080",
temperature=0,
seed=0
)
Settings.transformations = [
SentenceSplitter(
chunk_size=256,
chunk_overlap=5
)
]
from llama_index.core import SimpleDirectoryReader
local_doc_reader = SimpleDirectoryReader(input_dir='/home/rodomb/data')
docs = local_doc_reader.load_data(show_progress=True)
Next in command line I put: # python3 LlamaIndex.py
and unfortunately I received errors:
Loading files: 0%|
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 52, in _try_loading_included_file_formats
from llama_index.readers.file import (
ModuleNotFoundError: No module named 'llama_index.readers.file'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "LlamaIndex.py", line 28, in
docs = local_doc_reader.load_data(show_progress=True)
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 700, in load_data
SimpleDirectoryReader.load_file(
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 518, in load_file
default_file_reader_cls = SimpleDirectoryReader.supported_suffix_fn()
File "/usr/local/lib/python3.8/dist-packages/llama_index/core/readers/file/base.py", line 67, in _try_loading_included_file_formats
raise ImportError("
llama-index-readers-file
package not found")ImportError:
llama-index-readers-file
package not foundWhat can I do to resolve this situation??
BR Roman
Beta Was this translation helpful? Give feedback.
All reactions