Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pageindex/page_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def check_title_appearance(item, page_list, start_index=1, model=None):
Reply format:
{{

"thinking": <why do you think the section appears or starts in the page_text>
"thinking": <why do you think the section appears or starts in the page_text>,
"answer": "yes or no" (yes if the section appears or starts in the page_text, no otherwise)
}}
Directly return the final JSON structure. Do not output anything else."""
Expand Down Expand Up @@ -59,7 +59,7 @@ async def check_title_appearance_in_start(title, page_text, model=None, logger=N

reply format:
{{
"thinking": <why do you think the section appears or starts in the page_text>
"thinking": <why do you think the section appears or starts in the page_text>,
"start_begin": "yes or no" (yes if the section starts in the beginning of the page_text, no otherwise)
}}
Directly return the final JSON structure. Do not output anything else."""
Expand Down Expand Up @@ -109,7 +109,7 @@ def toc_detector_single_page(content, model=None):

return the following JSON format:
{{
"thinking": <why do you think there is a table of content in the given text>
"thinking": <why do you think there is a table of content in the given text>,
"toc_detected": "<yes or no>",
}}

Expand All @@ -129,7 +129,7 @@ def check_if_toc_extraction_is_complete(content, toc, model=None):

Reply format:
{{
"thinking": <why do you think the table of contents is complete or not>
"thinking": <why do you think the table of contents is complete or not>,
"completed": "yes" or "no"
}}
Directly return the final JSON structure. Do not output anything else."""
Expand All @@ -147,7 +147,7 @@ def check_if_toc_transformation_is_complete(content, toc, model=None):

Reply format:
{{
"thinking": <why do you think the cleaned table of contents is complete or not>
"thinking": <why do you think the cleaned table of contents is complete or not>,
"completed": "yes" or "no"
}}
Directly return the final JSON structure. Do not output anything else."""
Expand Down Expand Up @@ -210,7 +210,7 @@ def detect_page_index(toc_content, model=None):

Reply format:
{{
"thinking": <why do you think there are page numbers/indices given within the table of contents>
"thinking": <why do you think there are page numbers/indices given within the table of contents>,
"page_index_given_in_toc": "<yes or no>"
}}
Directly return the final JSON structure. Do not output anything else."""
Expand Down