1

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.

Nithin
  • 9,661
  • 14
  • 44
  • 67

1 Answers1

0

Your code just works fine for me, maybe your folder path can cause this.

I am on llama_index -> 0.7.4

here

enter image description here