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

Function generate_doc_description

pageindex/utils.py:622–631  ·  view source on GitHub ↗
(structure, model=None)

Source from the content-addressed store, hash-verified

620
621
622def generate_doc_description(structure, model=None):
623 prompt = f"""Your are an expert in generating descriptions for a document.
624 You are given a structure of a document. Your task is to generate a one-sentence description for the document, which makes it easy to distinguish the document from other documents.
625
626 Document Structure: {structure}
627
628 Directly return the description, do not include any other text.
629 """
630 response = llm_completion(model, prompt)
631 return response
632
633
634def reorder_dict(data, key_order):

Callers 2

page_index_builderFunction · 0.85
md_to_treeFunction · 0.85

Calls 1

llm_completionFunction · 0.85

Tested by

no test coverage detected