MCPcopy
hub / github.com/VectifyAI/PageIndex / remove_structure_text

Function remove_structure_text

pageindex/utils.py:495–503  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

493
494
495def remove_structure_text(data):
496 if isinstance(data, dict):
497 data.pop('text', None)
498 if 'nodes' in data:
499 remove_structure_text(data['nodes'])
500 elif isinstance(data, list):
501 for item in data:
502 remove_structure_text(item)
503 return data
504
505
506def check_token_limit(structure, limit=110000):

Callers 1

page_index_builderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected