run-llama / llama-hub

A library of data loaders for LLMs made by the community -- to be used with LlamaIndex and/or LangChain
https://llamahub.ai/
MIT License
3.42k stars 727 forks source link

[Bug]: Outdated import statements in llama_hub/file/unstructured/base.py #948

Closed jfkoh closed 4 months ago

jfkoh commented 4 months ago

Bug Description

In the script llama_hub/file/unstructured/base.py, lines 10 and 11, there are 2 import statements which are outdated:

from llama_index.readers.base import BaseReader
from llama_index.readers.schema.base import Document

To update them, replace with:

from llama_index.core.readers.base import BaseReader
from llama_index.core.schema import Document

Version

llama-index-0.10.1

Steps to Reproduce

In a Python script, this import statement will trigger the error:

from llama_hub.file.unstructured import UnstructuredReader

Relevant Logs/Tracbacks

File "/.../venvs/stb-chroma/lib/python3.10/site-packages/llama_hub/file/unstructured/base.py", line 10, in <module>
    from llama_index.readers.base import BaseReader
ModuleNotFoundError: No module named 'llama_index.readers.base'
logan-markewich commented 4 months ago

@jfkoh the packages in this repo are deprecated. Please see the main llama index repo.

You can run pip install llama-index-readers-file

https://github.com/run-llama/llama_index/blob/3823389e3f91cab47b72e2cc2814826db9f98e32/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/__init__.py#L36

jfkoh commented 4 months ago

Thanks Logan for the update! :)

Yes, I just saw the note on https://pypi.org/project/llama-hub/ that the llama_hub repo is deprecated.