@@ -452,6 +452,7 @@ def upload_file(
452452 file_type : str | Omit = omit ,
453453 metadata : str | Omit = omit ,
454454 mime_type : str | Omit = omit ,
455+ use_advanced_processing : str | Omit = omit ,
455456 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
456457 # The extra values given here take precedence over values defined on the client or passed to this method.
457458 extra_headers : Headers | None = None ,
@@ -481,6 +482,9 @@ def upload_file(
481482 mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
482483 use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
483484
485+ use_advanced_processing: Use advanced processing with Reducto for better PDF extraction and chunking.
486+ This costs 3x tokens but provides superior quality for complex documents.
487+
484488 extra_headers: Send extra headers
485489
486490 extra_query: Add additional query parameters to the request
@@ -496,6 +500,7 @@ def upload_file(
496500 "file_type" : file_type ,
497501 "metadata" : metadata ,
498502 "mime_type" : mime_type ,
503+ "use_advanced_processing" : use_advanced_processing ,
499504 }
500505 )
501506 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
@@ -928,6 +933,7 @@ async def upload_file(
928933 file_type : str | Omit = omit ,
929934 metadata : str | Omit = omit ,
930935 mime_type : str | Omit = omit ,
936+ use_advanced_processing : str | Omit = omit ,
931937 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
932938 # The extra values given here take precedence over values defined on the client or passed to this method.
933939 extra_headers : Headers | None = None ,
@@ -957,6 +963,9 @@ async def upload_file(
957963 mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
958964 use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
959965
966+ use_advanced_processing: Use advanced processing with Reducto for better PDF extraction and chunking.
967+ This costs 3x tokens but provides superior quality for complex documents.
968+
960969 extra_headers: Send extra headers
961970
962971 extra_query: Add additional query parameters to the request
@@ -972,6 +981,7 @@ async def upload_file(
972981 "file_type" : file_type ,
973982 "metadata" : metadata ,
974983 "mime_type" : mime_type ,
984+ "use_advanced_processing" : use_advanced_processing ,
975985 }
976986 )
977987 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
0 commit comments