@@ -153,7 +153,7 @@ def partition_file_via_api(file_tuple, request, filename, content_type, **partit
153153
154154
155155def partition_pdf_splits (
156- request , pdf_pages , file , file_filename , content_type , coordinates , ** partition_kwargs
156+ request , pdf_pages , file , metadata_filename , content_type , coordinates , ** partition_kwargs
157157):
158158 """
159159 Split a pdf into chunks and process in parallel with more api calls, or partition
@@ -162,7 +162,7 @@ def partition_pdf_splits(
162162
163163 Arguments:
164164 request is used to forward relevant headers to the api calls
165- file, file_filename and content_type are passed on in the file argument to requests.post
165+ file, metadata_filename and content_type are passed on in the file argument to requests.post
166166 coordinates is passed on to the api calls, but cannot be used in the local partition case
167167 partition_kwargs holds any others parameters that will be forwarded, or passed to partition
168168 """
@@ -171,7 +171,10 @@ def partition_pdf_splits(
171171 # If it's small enough, just process locally
172172 if len (pdf_pages ) <= pages_per_pdf :
173173 return partition (
174- file = file , file_filename = file_filename , content_type = content_type , ** partition_kwargs
174+ file = file ,
175+ metadata_filename = metadata_filename ,
176+ content_type = content_type ,
177+ ** partition_kwargs ,
175178 )
176179
177180 results = []
@@ -180,7 +183,7 @@ def partition_pdf_splits(
180183 partition_func = partial (
181184 partition_file_via_api ,
182185 request = request ,
183- filename = file_filename ,
186+ filename = metadata_filename ,
184187 content_type = content_type ,
185188 coordinates = coordinates ,
186189 ** partition_kwargs ,
@@ -340,7 +343,7 @@ def pipeline_api(
340343 request ,
341344 pdf_pages = pdf .pages ,
342345 file = file ,
343- file_filename = filename ,
346+ metadata_filename = filename ,
344347 content_type = file_content_type ,
345348 coordinates = show_coordinates ,
346349 # partition_kwargs
@@ -356,7 +359,7 @@ def pipeline_api(
356359 else :
357360 elements = partition (
358361 file = file ,
359- file_filename = filename ,
362+ metadata_filename = filename ,
360363 content_type = file_content_type ,
361364 # partition_kwargs
362365 encoding = encoding ,
@@ -502,7 +505,7 @@ def return_content_type(filename):
502505
503506
504507@router .post ("/general/v0/general" )
505- @router .post ("/general/v0.0.40 /general" )
508+ @router .post ("/general/v0.0.41 /general" )
506509def pipeline_1 (
507510 request : Request ,
508511 gz_uncompressed_content_type : Optional [str ] = Form (default = None ),
0 commit comments