MCPcopy Create free account
hub / github.com/VectifyAI/PageIndex / add_node_text_with_labels

Function add_node_text_with_labels

pageindex/utils.py:565–575  ·  view source on GitHub ↗
(node, pdf_pages)

Source from the content-addressed store, hash-verified

563
564
565def add_node_text_with_labels(node, pdf_pages):
566 if isinstance(node, dict):
567 start_page = node.get('start_index')
568 end_page = node.get('end_index')
569 node['text'] = get_text_of_pdf_pages_with_labels(pdf_pages, start_page, end_page)
570 if 'nodes' in node:
571 add_node_text_with_labels(node['nodes'], pdf_pages)
572 elif isinstance(node, list):
573 for index in range(len(node)):
574 add_node_text_with_labels(node[index], pdf_pages)
575 return
576
577
578async def generate_node_summary(node, model=None):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected