Skip to main content

llama-index readers remote_depth integration

Project description

Remote Page/File Loader

This loader makes it easy to extract the text from the links available in a webpage URL, and extract the links presents in the page. It's based on RemoteReader (reading single page), that is based on SimpleDirectoryReader (parsing the document if file is a pdf, etc). It is an all-in-one tool for (almost) any group of urls.

You can try with this MIT lecture link, it will be able to extract the syllabus, the PDFs, etc: https://ocw.mit.edu/courses/5-05-principles-of-inorganic-chemistry-iii-spring-2005/pages/syllabus/

Usage

You need to specify the parameter depth to specify how many levels of links you want to extract. For example, if you want to extract the links in the page, and the links in the links in the page, you need to specify depth=2.

from llama_index import download_loader

RemoteDepthReader = download_loader("RemoteDepthReader")

loader = RemoteDepthReader()
documents = loader.load_data(
    url="https://ocw.mit.edu/courses/5-05-principles-of-inorganic-chemistry-iii-spring-2005/pages/syllabus/"
)

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent. See here for examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_remote_depth-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_readers_remote_depth-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_remote_depth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3561e756bd92eb228060145c984b973b5a73d8cb635ad2d767407b2022cc580d
MD5 90ee23e52828c4323759a418174ae2a7
BLAKE2b-256 9d7fa5a412df4d4abbb7eb59e210c98c653aea32fa368dceb0b25179d8fa4fac

See more details on using hashes here.

File details

Details for the file llama_index_readers_remote_depth-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_remote_depth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1db41a4ed584a1b4bb836ddd56a05d19b3e27b852b1ac567dc4ef5397eb9fddd
MD5 1674aeca276cf2d06e0e33f0f854e498
BLAKE2b-256 d1574531514ac8f4830b4c454ee033c1dfa425e866d458e9743185d314c20011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page