I'm new to Llama Parse, and trying to implement it in a small Llama 3.1 based RAG app that uses Langchain. I am trying to use Document.to_langchain_format() to make the document object usable in langchain, but I keep running into the "Attribute Error: Tuple object has no attribute 'metadata'", despite passing in a function that returns a metadata dict. The Kapa.ai hasn't been much help. Anyone able to give me some assistance here?
if extension == '.pdf': from llama_parse import LlamaParse from llama_index.core import SimpleDirectoryReader from llama_index.core.schema import Document
parser = LlamaParse(result_type="markdown") # "markdown" and "text" are available) file_extractor = {".pdf": parser}