(structure, model=None)
| 620 | |
| 621 | |
| 622 | def 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 | |
| 634 | def reorder_dict(data, key_order): |
no test coverage detected