Co-authored-by: Jerry Liu <jerry@robustintelligence.com>
This commit is contained in:
Jerry Liu 2023-02-22 09:43:29 -08:00 committed by GitHub
parent 5d22855368
commit e631266036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,13 +26,13 @@ from llama_index import download_loader
SimpleDirectoryReader = download_loader("SimpleDirectoryReader")
loader = SimpleDirectoryReader()
documents = loader.load_data('./data', file_extractor={
loader = SimpleDirectoryReader('./data', file_extractor={
".pdf": "UnstructuredReader",
".html": "UnstructuredReader",
".eml": "UnstructuredReader",
".pptx": "PptxReader"
})
documents = loader.load_data()
```
This loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/jerryjliu/gpt_index/tree/main/gpt_index) and/or subsequently used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.