Reputation:
I am unable to extract metadata information from the documents. PFB my code
filename_fn = lambda filename: {'file_name': filename}
documents = SimpleDirectoryReader("../data", file_metadata=filename_fn).load_data()
print([x for x in documents])
It's printing the empty array. I have a few documents in the data folder.
Upvotes: 1
Views: 1008
Reputation: 41
Your code just works fine for me, maybe your folder path can cause this.
I am on llama_index -> 0.7.4
Upvotes: 0