mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-04-24 23:56:21 +02:00
fix option for adding node text
This commit is contained in:
parent
36b22e3bc7
commit
ad65e3f19c
2 changed files with 10 additions and 5 deletions
|
|
@ -1022,12 +1022,14 @@ def page_index_main(doc, opt=None):
|
|||
structure = asyncio.run(tree_parser(page_list, opt, doc=doc, logger=logger))
|
||||
if opt.if_add_node_id == 'yes':
|
||||
write_node_id(structure)
|
||||
if opt.if_add_node_summary == 'yes':
|
||||
if opt.if_add_node_text == 'yes':
|
||||
add_node_text(structure, page_list)
|
||||
if opt.if_add_node_summary == 'yes':
|
||||
if opt.if_add_node_text == 'no':
|
||||
add_node_text(structure, page_list)
|
||||
asyncio.run(generate_summaries_for_structure(structure, model=opt.model))
|
||||
remove_structure_text(structure)
|
||||
if opt.if_add_node_text == 'yes':
|
||||
add_node_text_with_labels(structure, page_list)
|
||||
if opt.if_add_node_text == 'no':
|
||||
remove_structure_text(structure)
|
||||
if opt.if_add_doc_description == 'yes':
|
||||
doc_description = generate_doc_description(structure, model=opt.model)
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue