Find answers from the community

Updated 4 months ago

is there a way to load one single txt

At a glance

The community member is asking if there is a way to load a single text file, as they cannot find this functionality in any connectors and the simpledirectoryreader works but only for directories. The comments suggest that the community member can pass the filename directly in the path using path.loader.load_data(file=Path('file.html')). Another community member mentions using a loader from the LlamaIndex library, specifically the simpleDirectoryReader with input_files=[path of files here]. However, there is no explicitly marked answer in the comments.

Useful resources
is there a way to load one single txt file ? i cant find that in any connectors and simpledirectoryreader works but for the dir :/
F
S
W
5 comments
You can just pass the filename directly in the path.
Plain Text
loader.load_data(file=Path('file.html'))
then whats the loader obj ?
I used a loader from llama hub, it might be different for yours ^
Add a reply
Sign up and join the conversation on Discord