diff --git a/lib/aryn-sdk/aryn_sdk/partition/partition.py b/lib/aryn-sdk/aryn_sdk/partition/partition.py index bdd30ae45..79aabe76f 100644 --- a/lib/aryn-sdk/aryn_sdk/partition/partition.py +++ b/lib/aryn-sdk/aryn_sdk/partition/partition.py @@ -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] = {}, @@ -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. @@ -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, @@ -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] = {}, @@ -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, @@ -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] = {}, @@ -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, @@ -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] = {}, @@ -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: @@ -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] = {}, @@ -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,