1616 ResultsResourceWithStreamingResponse ,
1717 AsyncResultsResourceWithStreamingResponse ,
1818)
19+ from ..._files import deepcopy_with_paths
1920from ..._types import (
2021 Body ,
2122 Omit ,
2728 omit ,
2829 not_given ,
2930)
30- from ..._utils import extract_files , maybe_transform , deepcopy_minimal , async_maybe_transform
31+ from ..._utils import extract_files , maybe_transform , async_maybe_transform
3132from ..._compat import cached_property
3233from ..._resource import SyncAPIResource , AsyncAPIResource
3334from ..._response import (
@@ -124,7 +125,7 @@ def async_(
124125
125126 timeout: Override the client-level default timeout for this request, in seconds
126127 """
127- body = deepcopy_minimal (
128+ body = deepcopy_with_paths (
128129 {
129130 "output_format" : output_format ,
130131 "csv_options" : csv_options ,
@@ -135,7 +136,8 @@ def async_(
135136 "include_metadata" : include_metadata ,
136137 "json_options" : json_options ,
137138 "prompt_mode" : prompt_mode ,
138- }
139+ },
140+ [["file" ]],
139141 )
140142 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
141143 # It should be noted that the actual Content-Type header that will be
@@ -187,7 +189,7 @@ def batch(
187189
188190 timeout: Override the client-level default timeout for this request, in seconds
189191 """
190- body = deepcopy_minimal (
192+ body = deepcopy_with_paths (
191193 {
192194 "files" : files ,
193195 "output_format" : output_format ,
@@ -196,7 +198,8 @@ def batch(
196198 "include_metadata" : include_metadata ,
197199 "json_options" : json_options ,
198200 "prompt_mode" : prompt_mode ,
199- }
201+ },
202+ [["files" , "<array>" ]],
200203 )
201204 extracted_files = extract_files (cast (Mapping [str , object ], body ), paths = [["files" , "<array>" ]])
202205 # It should be noted that the actual Content-Type header that will be
@@ -279,7 +282,7 @@ def stream(
279282 timeout: Override the client-level default timeout for this request, in seconds
280283 """
281284 extra_headers = {"Accept" : "text/event-stream" , ** (extra_headers or {})}
282- body = deepcopy_minimal (
285+ body = deepcopy_with_paths (
283286 {
284287 "output_format" : output_format ,
285288 "csv_options" : csv_options ,
@@ -291,7 +294,8 @@ def stream(
291294 "include_metadata" : include_metadata ,
292295 "json_options" : json_options ,
293296 "prompt_mode" : prompt_mode ,
294- }
297+ },
298+ [["file" ]],
295299 )
296300 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
297301 # It should be noted that the actual Content-Type header that will be
@@ -365,7 +369,7 @@ def sync(
365369
366370 timeout: Override the client-level default timeout for this request, in seconds
367371 """
368- body = deepcopy_minimal (
372+ body = deepcopy_with_paths (
369373 {
370374 "output_format" : output_format ,
371375 "csv_options" : csv_options ,
@@ -376,7 +380,8 @@ def sync(
376380 "include_metadata" : include_metadata ,
377381 "json_options" : json_options ,
378382 "prompt_mode" : prompt_mode ,
379- }
383+ },
384+ [["file" ]],
380385 )
381386 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
382387 # It should be noted that the actual Content-Type header that will be
@@ -473,7 +478,7 @@ async def async_(
473478
474479 timeout: Override the client-level default timeout for this request, in seconds
475480 """
476- body = deepcopy_minimal (
481+ body = deepcopy_with_paths (
477482 {
478483 "output_format" : output_format ,
479484 "csv_options" : csv_options ,
@@ -484,7 +489,8 @@ async def async_(
484489 "include_metadata" : include_metadata ,
485490 "json_options" : json_options ,
486491 "prompt_mode" : prompt_mode ,
487- }
492+ },
493+ [["file" ]],
488494 )
489495 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
490496 # It should be noted that the actual Content-Type header that will be
@@ -536,7 +542,7 @@ async def batch(
536542
537543 timeout: Override the client-level default timeout for this request, in seconds
538544 """
539- body = deepcopy_minimal (
545+ body = deepcopy_with_paths (
540546 {
541547 "files" : files ,
542548 "output_format" : output_format ,
@@ -545,7 +551,8 @@ async def batch(
545551 "include_metadata" : include_metadata ,
546552 "json_options" : json_options ,
547553 "prompt_mode" : prompt_mode ,
548- }
554+ },
555+ [["files" , "<array>" ]],
549556 )
550557 extracted_files = extract_files (cast (Mapping [str , object ], body ), paths = [["files" , "<array>" ]])
551558 # It should be noted that the actual Content-Type header that will be
@@ -628,7 +635,7 @@ async def stream(
628635 timeout: Override the client-level default timeout for this request, in seconds
629636 """
630637 extra_headers = {"Accept" : "text/event-stream" , ** (extra_headers or {})}
631- body = deepcopy_minimal (
638+ body = deepcopy_with_paths (
632639 {
633640 "output_format" : output_format ,
634641 "csv_options" : csv_options ,
@@ -640,7 +647,8 @@ async def stream(
640647 "include_metadata" : include_metadata ,
641648 "json_options" : json_options ,
642649 "prompt_mode" : prompt_mode ,
643- }
650+ },
651+ [["file" ]],
644652 )
645653 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
646654 # It should be noted that the actual Content-Type header that will be
@@ -714,7 +722,7 @@ async def sync(
714722
715723 timeout: Override the client-level default timeout for this request, in seconds
716724 """
717- body = deepcopy_minimal (
725+ body = deepcopy_with_paths (
718726 {
719727 "output_format" : output_format ,
720728 "csv_options" : csv_options ,
@@ -725,7 +733,8 @@ async def sync(
725733 "include_metadata" : include_metadata ,
726734 "json_options" : json_options ,
727735 "prompt_mode" : prompt_mode ,
728- }
736+ },
737+ [["file" ]],
729738 )
730739 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
731740 # It should be noted that the actual Content-Type header that will be
0 commit comments