----------------------
I see, you're using the
LlamaParse
to load your data and then passing the returned documents to
get_nodes_from_documents
. Here's a general example of how you might do this:
from llama_parse import LlamaParse
from llama_index.core.node_parser import MarkdownElementNodeParser
from llama_index.llms.openai import OpenAI
# Load data using LlamaParse
parser = LlamaParse(result_type="markdown")
documents = parser.load_data(file_path="./data/your_file.pdf")
# Parse nodes from documents
md_node_parser = MarkdownElementNodeParser(
llm=OpenAI(model="gpt-4.5-turbo-preview"),
num_workers=3,
include_metadata=True,
)
nodes = md_node_parser.get_nodes_from_documents(documents)
(Source:
LlamaIndex GitHub ())
If you're still encountering the error, it's possible that there's an issue with the specific documents you're trying to parse. The error message suggests that there might be a problem with the format of the data in the documents.
You might want to check the content of the documents returned by
LlamaParse
to see if there's anything unusual that might be causing the issue. If the problem persists, I would recommend reaching out to the LlamaIndex support for further assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------