33from __future__ import annotations
44
55from typing import Mapping , cast
6+ from typing_extensions import Literal
67
78import httpx
89
9- from ... types import extract_sync_params
10- from ... _types import Body , Query , Headers , NotGiven , FileTypes , not_given
11- from ... _utils import extract_files , maybe_transform , deepcopy_minimal , async_maybe_transform
12- from ... _compat import cached_property
13- from ... _resource import SyncAPIResource , AsyncAPIResource
14- from ... _response import (
10+ from ..types import extract_sync_params
11+ from .._types import Body , Omit , Query , Headers , NotGiven , FileTypes , omit , not_given
12+ from .._utils import extract_files , maybe_transform , deepcopy_minimal , async_maybe_transform
13+ from .._compat import cached_property
14+ from .._resource import SyncAPIResource , AsyncAPIResource
15+ from .._response import (
1516 to_raw_response_wrapper ,
1617 to_streamed_response_wrapper ,
1718 async_to_raw_response_wrapper ,
1819 async_to_streamed_response_wrapper ,
1920)
20- from ... _base_client import make_request_options
21- from ... types .extract_response import ExtractResponse
21+ from .._base_client import make_request_options
22+ from ..types .extract_response import ExtractResponse
2223
2324__all__ = ["ExtractResource" , "AsyncExtractResource" ]
2425
@@ -48,6 +49,13 @@ def sync(
4849 * ,
4950 file : FileTypes ,
5051 output_format : str ,
52+ csv_options : str | Omit = omit ,
53+ custom_instructions : str | Omit = omit ,
54+ file_base64 : str | Omit = omit ,
55+ file_url : str | Omit = omit ,
56+ include_metadata : str | Omit = omit ,
57+ json_options : str | Omit = omit ,
58+ prompt_mode : Literal ["append" , "replace" ] | Omit = omit ,
5159 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5260 # The extra values given here take precedence over values defined on the client or passed to this method.
5361 extra_headers : Headers | None = None ,
@@ -59,9 +67,23 @@ def sync(
5967 Process a document and return extracted content immediately.
6068
6169 Args:
62- file: File to upload
70+ file: File to upload (PDF, Word, Excel, PowerPoint, images)
6371
64- output_format: Output format
72+ output_format: Output format(s): markdown, html, json, csv.
73+
74+ csv_options: CSV extraction options
75+
76+ custom_instructions: Custom extraction instructions
77+
78+ file_base64: Base64-encoded file content
79+
80+ file_url: URL to download file from
81+
82+ include_metadata: Comma-separated metadata types
83+
84+ json_options: JSON extraction options
85+
86+ prompt_mode: append or replace
6587
6688 extra_headers: Send extra headers
6789
@@ -75,6 +97,13 @@ def sync(
7597 {
7698 "file" : file ,
7799 "output_format" : output_format ,
100+ "csv_options" : csv_options ,
101+ "custom_instructions" : custom_instructions ,
102+ "file_base64" : file_base64 ,
103+ "file_url" : file_url ,
104+ "include_metadata" : include_metadata ,
105+ "json_options" : json_options ,
106+ "prompt_mode" : prompt_mode ,
78107 }
79108 )
80109 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
@@ -118,6 +147,13 @@ async def sync(
118147 * ,
119148 file : FileTypes ,
120149 output_format : str ,
150+ csv_options : str | Omit = omit ,
151+ custom_instructions : str | Omit = omit ,
152+ file_base64 : str | Omit = omit ,
153+ file_url : str | Omit = omit ,
154+ include_metadata : str | Omit = omit ,
155+ json_options : str | Omit = omit ,
156+ prompt_mode : Literal ["append" , "replace" ] | Omit = omit ,
121157 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122158 # The extra values given here take precedence over values defined on the client or passed to this method.
123159 extra_headers : Headers | None = None ,
@@ -129,9 +165,23 @@ async def sync(
129165 Process a document and return extracted content immediately.
130166
131167 Args:
132- file: File to upload
168+ file: File to upload (PDF, Word, Excel, PowerPoint, images)
169+
170+ output_format: Output format(s): markdown, html, json, csv.
171+
172+ csv_options: CSV extraction options
173+
174+ custom_instructions: Custom extraction instructions
175+
176+ file_base64: Base64-encoded file content
177+
178+ file_url: URL to download file from
179+
180+ include_metadata: Comma-separated metadata types
181+
182+ json_options: JSON extraction options
133183
134- output_format: Output format
184+ prompt_mode: append or replace
135185
136186 extra_headers: Send extra headers
137187
@@ -145,6 +195,13 @@ async def sync(
145195 {
146196 "file" : file ,
147197 "output_format" : output_format ,
198+ "csv_options" : csv_options ,
199+ "custom_instructions" : custom_instructions ,
200+ "file_base64" : file_base64 ,
201+ "file_url" : file_url ,
202+ "include_metadata" : include_metadata ,
203+ "json_options" : json_options ,
204+ "prompt_mode" : prompt_mode ,
148205 }
149206 )
150207 files = extract_files (cast (Mapping [str , object ], body ), paths = [["file" ]])
0 commit comments