Skip to content

Commit

Permalink
add summarize to asdk
Browse files Browse the repository at this point in the history
  • Loading branch information
karanataryn committed Feb 17, 2025
1 parent 21c3fc0 commit dbc1cfd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/aryn-sdk/aryn_sdk/partition/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def partition_file(
threshold: Optional[Union[float, Literal["auto"]]] = None,
use_ocr: bool = False,
ocr_images: bool = False,
summarize_images: bool = False,
ocr_language: Optional[str] = None,
extract_table_structure: bool = False,
table_extraction_options: dict[str, Any] = {},
Expand Down Expand Up @@ -82,6 +83,7 @@ def partition_file(
default: False
ocr_images: attempt to use OCR to generate a text representation of detected images.
default: False
summarize_images: Generate a text summary of detected images using a VLM.
ocr_language: specify the language to use for OCR. If not set, the language will be english.
default: English
extract_table_structure: extract tables and their structural content.
Expand Down Expand Up @@ -157,6 +159,7 @@ def partition_file(
threshold=threshold,
use_ocr=use_ocr,
ocr_images=ocr_images,
summarize_images=summarize_images,
ocr_language=ocr_language,
extract_table_structure=extract_table_structure,
table_extraction_options=table_extraction_options,
Expand All @@ -180,6 +183,7 @@ def _partition_file_wrapper(
threshold: Optional[Union[float, Literal["auto"]]] = None,
use_ocr: bool = False,
ocr_images: bool = False,
summarize_images: bool = False,
ocr_language: Optional[str] = None,
extract_table_structure: bool = False,
table_extraction_options: dict[str, Any] = {},
Expand Down Expand Up @@ -209,6 +213,7 @@ def _partition_file_wrapper(
threshold=threshold,
use_ocr=use_ocr,
ocr_images=ocr_images,
summarize_images=summarize_images,
ocr_language=ocr_language,
extract_table_structure=extract_table_structure,
table_extraction_options=table_extraction_options,
Expand Down Expand Up @@ -236,6 +241,7 @@ def _partition_file_inner(
threshold: Optional[Union[float, Literal["auto"]]] = None,
use_ocr: bool = False,
ocr_images: bool = False,
summarize_images: bool = False,
ocr_language: Optional[str] = None,
extract_table_structure: bool = False,
table_extraction_options: dict[str, Any] = {},
Expand Down Expand Up @@ -269,6 +275,7 @@ def _partition_file_inner(
threshold=threshold,
use_ocr=use_ocr,
ocr_images=ocr_images,
summarize_images=summarize_images,
ocr_language=ocr_language,
extract_table_structure=extract_table_structure,
table_extraction_options=table_extraction_options,
Expand Down Expand Up @@ -376,6 +383,7 @@ def _json_options(
threshold: Optional[Union[float, Literal["auto"]]] = None,
use_ocr: bool = False,
ocr_images: bool = False,
summarize_images: bool = False,
ocr_language: Optional[str] = None,
extract_table_structure: bool = False,
table_extraction_options: dict[str, Any] = {},
Expand All @@ -393,6 +401,8 @@ def _json_options(
options["use_ocr"] = use_ocr
if ocr_images:
options["ocr_images"] = ocr_images
if summarize_images:
options["summarize_images"] = summarize_images
if ocr_language:
options["ocr_language"] = ocr_language
if extract_images:
Expand Down Expand Up @@ -423,6 +433,7 @@ def partition_file_async_submit(
threshold: Optional[Union[float, Literal["auto"]]] = None,
use_ocr: bool = False,
ocr_images: bool = False,
summarize_images: bool = False,
ocr_language: Optional[str] = None,
extract_table_structure: bool = False,
table_extraction_options: dict[str, Any] = {},
Expand Down Expand Up @@ -479,6 +490,7 @@ def partition_file_async_submit(
threshold=threshold,
use_ocr=use_ocr,
ocr_images=ocr_images,
summarize_images=summarize_images,
ocr_language=ocr_language,
extract_table_structure=extract_table_structure,
table_extraction_options=table_extraction_options,
Expand Down

0 comments on commit dbc1cfd

Please sign in to comment.