redis-developer / redis-ai-resources

✨ A curated list of awesome community resources, integrations, and examples of Redis in the AI ecosystem.
MIT License
159 stars 18 forks source link

Upgrade from langchain.document_loaders to langchain_unstructured #40

Open antonum opened 1 month ago

antonum commented 1 month ago

https://github.com/redis-developer/redis-ai-resources/blob/main/python-recipes/RAG/01_redisvl.ipynb

loader = UnstructuredFileLoader(
    doc, mode="single", strategy="fast"
)

Fails to load any data and triggers the warning:

:8: LangChainDeprecationWarning: The class `UnstructuredFileLoader` was deprecated in LangChain 0.2.8 and will be removed in 1.0. An updated version of the class exists in the :class:`~langchain-unstructured package and should be used instead. To use it run `pip install -U :class:`~langchain-unstructured` and import as `from :class:`~langchain_unstructured import UnstructuredLoader``. loader = UnstructuredFileLoader( Done preprocessing. Created 0 chunks of the original pdf resources/nke-10k-2023.pdf