Find answers from the community

Updated 5 months ago

So ive made some progress I am curious

At a glance
So ive made some progress. I am curious what i am missing now, the output for my response is None at the moment. I dont believe it is reading my data file properly? my data file is in the same directory as my script currently. I run the script and get that None response. Seems like documents isnt reading the file?
Attachment
image.png
L
B
14 comments
is data a file or directory?

If it's a file, try documents = SimpleDirectoryReader(input_files=["data"]).load() instead
(normally though, you'll want to keep the file extension to help llama-index know how to best parse it, otherwise it assumes it's a txt file)
It is a text file currently.
Attachment
image.png
whoops typo on my part
ya method is invalid
documents = SimpleDirectoryReader(input_files=["data"]).load_data()
that worked, awesome thanks man
if i set it to point to a directory can i put multiple text files in there and it will analzye them all?
it will work for most file types too
thats great. Hopefully this wont be difficult to put on a aws server lol
had some weird issues with the imports
yea I saw that. Should be easier with docker and/or a venv tbh
Add a reply
Sign up and join the conversation on Discord