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

Function generate_node_summary

pageindex/utils.py:578–586  ·  view source on GitHub ↗
(node, model=None)

Source from the content-addressed store, hash-verified

576
577
578async def generate_node_summary(node, model=None):
579 prompt = f"""You are given a part of a document, your task is to generate a description of the partial document about what are main points covered in the partial document.
580
581 Partial Document Text: {node['text']}
582
583 Directly return the description, do not include any other text.
584 """
585 response = await llm_acompletion(model, prompt)
586 return response
587
588
589async def generate_summaries_for_structure(structure, model=None):

Callers 2

get_node_summaryFunction · 0.85

Calls 1

llm_acompletionFunction · 0.85

Tested by

no test coverage detected