retab 0.0.42__py3-none-any.whl → 0.0.44__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- retab/__init__.py +2 -1
- retab/client.py +26 -51
- retab/generate_types.py +180 -0
- retab/resources/consensus/client.py +1 -1
- retab/resources/consensus/responses.py +1 -1
- retab/resources/deployments/__init__.py +3 -0
- retab/resources/deployments/automations/__init__.py +9 -0
- retab/resources/deployments/automations/client.py +244 -0
- retab/resources/deployments/automations/endpoints.py +290 -0
- retab/resources/deployments/automations/links.py +303 -0
- retab/resources/deployments/automations/logs.py +222 -0
- retab/resources/deployments/automations/mailboxes.py +423 -0
- retab/resources/deployments/automations/outlook.py +377 -0
- retab/resources/deployments/automations/tests.py +161 -0
- retab/resources/deployments/client.py +148 -0
- retab/resources/documents/client.py +94 -68
- retab/resources/documents/extractions.py +55 -46
- retab/resources/evaluations/__init__.py +2 -2
- retab/resources/evaluations/client.py +61 -77
- retab/resources/evaluations/documents.py +48 -37
- retab/resources/evaluations/iterations.py +58 -40
- retab/resources/jsonlUtils.py +3 -4
- retab/resources/processors/automations/endpoints.py +49 -39
- retab/resources/processors/automations/links.py +52 -43
- retab/resources/processors/automations/mailboxes.py +74 -59
- retab/resources/processors/automations/outlook.py +104 -82
- retab/resources/processors/client.py +35 -30
- retab/resources/projects/__init__.py +3 -0
- retab/resources/projects/client.py +285 -0
- retab/resources/projects/documents.py +244 -0
- retab/resources/projects/iterations.py +470 -0
- retab/resources/usage.py +2 -0
- retab/types/ai_models.py +2 -1
- retab/types/deprecated_evals.py +195 -0
- retab/types/evaluations/__init__.py +5 -2
- retab/types/evaluations/iterations.py +9 -43
- retab/types/evaluations/model.py +19 -24
- retab/types/extractions.py +1 -0
- retab/types/jobs/base.py +1 -1
- retab/types/jobs/evaluation.py +1 -1
- retab/types/logs.py +5 -6
- retab/types/mime.py +1 -10
- retab/types/projects/__init__.py +34 -0
- retab/types/projects/documents.py +30 -0
- retab/types/projects/iterations.py +78 -0
- retab/types/projects/model.py +68 -0
- retab/types/schemas/enhance.py +22 -5
- retab/types/schemas/evaluate.py +2 -2
- retab/types/schemas/object.py +27 -25
- retab/types/standards.py +2 -2
- retab/utils/__init__.py +3 -0
- retab/utils/ai_models.py +127 -12
- retab/utils/hashing.py +24 -0
- retab/utils/json_schema.py +1 -26
- retab/utils/mime.py +0 -17
- retab/utils/usage/usage.py +0 -1
- {retab-0.0.42.dist-info → retab-0.0.44.dist-info}/METADATA +4 -6
- {retab-0.0.42.dist-info → retab-0.0.44.dist-info}/RECORD +60 -55
- retab/_utils/__init__.py +0 -0
- retab/_utils/_model_cards/anthropic.yaml +0 -59
- retab/_utils/_model_cards/auto.yaml +0 -43
- retab/_utils/_model_cards/gemini.yaml +0 -117
- retab/_utils/_model_cards/openai.yaml +0 -301
- retab/_utils/_model_cards/xai.yaml +0 -28
- retab/_utils/ai_models.py +0 -138
- retab/_utils/benchmarking.py +0 -484
- retab/_utils/chat.py +0 -327
- retab/_utils/display.py +0 -440
- retab/_utils/json_schema.py +0 -2156
- retab/_utils/mime.py +0 -165
- retab/_utils/responses.py +0 -169
- retab/_utils/stream_context_managers.py +0 -52
- retab/_utils/usage/__init__.py +0 -0
- retab/_utils/usage/usage.py +0 -301
- {retab-0.0.42.dist-info → retab-0.0.44.dist-info}/WHEEL +0 -0
- {retab-0.0.42.dist-info → retab-0.0.44.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,6 @@ from typing import Any, Literal
|
|
4
4
|
|
5
5
|
import PIL.Image
|
6
6
|
from pydantic import HttpUrl
|
7
|
-
from pydantic_core import PydanticUndefined
|
8
7
|
from openai.types.chat.chat_completion_reasoning_effort import ChatCompletionReasoningEffort
|
9
8
|
|
10
9
|
from ..._resource import AsyncAPIResource, SyncAPIResource
|
@@ -19,8 +18,7 @@ from ...types.mime import MIMEData
|
|
19
18
|
from ...types.modalities import Modality
|
20
19
|
from ...types.ai_models import LLMModel
|
21
20
|
from ...types.schemas.object import Schema
|
22
|
-
from ...types.standards import PreparedRequest
|
23
|
-
from .extractions import AsyncExtractions, Extractions
|
21
|
+
from ...types.standards import PreparedRequest, FieldUnset
|
24
22
|
|
25
23
|
|
26
24
|
def maybe_parse_to_pydantic(schema: Schema, response: RetabParsedChatCompletion, allow_partial: bool = False) -> RetabParsedChatCompletion:
|
@@ -40,40 +38,50 @@ class BaseDocumentsMixin:
|
|
40
38
|
self,
|
41
39
|
document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl,
|
42
40
|
modality: Modality = "native",
|
43
|
-
image_resolution_dpi: int =
|
44
|
-
browser_canvas: BrowserCanvas =
|
41
|
+
image_resolution_dpi: int = FieldUnset,
|
42
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
45
43
|
idempotency_key: str | None = None,
|
46
44
|
) -> PreparedRequest:
|
47
45
|
mime_document = prepare_mime_document(document)
|
48
46
|
|
49
|
-
|
50
|
-
document
|
51
|
-
modality
|
52
|
-
|
53
|
-
|
47
|
+
loading_request_dict = {
|
48
|
+
"document": mime_document,
|
49
|
+
"modality": modality,
|
50
|
+
}
|
51
|
+
if image_resolution_dpi is not FieldUnset:
|
52
|
+
loading_request_dict["image_resolution_dpi"] = image_resolution_dpi
|
53
|
+
if browser_canvas is not FieldUnset:
|
54
|
+
loading_request_dict["browser_canvas"] = browser_canvas
|
55
|
+
|
56
|
+
loading_request = DocumentCreateMessageRequest(**loading_request_dict)
|
57
|
+
return PreparedRequest(
|
58
|
+
method="POST", url="/v1/documents/create_messages", data=loading_request.model_dump(mode="json", exclude_unset=True), idempotency_key=idempotency_key
|
54
59
|
)
|
55
|
-
return PreparedRequest(method="POST", url="/v1/documents/create_messages", data=loading_request.model_dump(), idempotency_key=idempotency_key)
|
56
60
|
|
57
61
|
def _prepare_create_inputs(
|
58
62
|
self,
|
59
63
|
document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl,
|
60
64
|
json_schema: dict[str, Any] | Path | str,
|
61
65
|
modality: Modality = "native",
|
62
|
-
image_resolution_dpi: int =
|
63
|
-
browser_canvas: BrowserCanvas =
|
66
|
+
image_resolution_dpi: int = FieldUnset,
|
67
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
64
68
|
idempotency_key: str | None = None,
|
65
69
|
) -> PreparedRequest:
|
66
70
|
mime_document = prepare_mime_document(document)
|
67
71
|
loaded_schema = load_json_schema(json_schema)
|
68
72
|
|
69
|
-
|
70
|
-
document
|
71
|
-
modality
|
72
|
-
json_schema
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
loading_request_dict = {
|
74
|
+
"document": mime_document,
|
75
|
+
"modality": modality,
|
76
|
+
"json_schema": loaded_schema,
|
77
|
+
}
|
78
|
+
if image_resolution_dpi is not FieldUnset:
|
79
|
+
loading_request_dict["image_resolution_dpi"] = image_resolution_dpi
|
80
|
+
if browser_canvas is not FieldUnset:
|
81
|
+
loading_request_dict["browser_canvas"] = browser_canvas
|
82
|
+
|
83
|
+
loading_request = DocumentCreateInputRequest(**loading_request_dict)
|
84
|
+
return PreparedRequest(method="POST", url="/v1/documents/create_inputs", data=loading_request.model_dump(mode="json", exclude_unset=True), idempotency_key=idempotency_key)
|
77
85
|
|
78
86
|
def _prepare_correct_image_orientation(self, document: Path | str | IOBase | MIMEData | PIL.Image.Image) -> PreparedRequest:
|
79
87
|
mime_document = prepare_mime_document(document)
|
@@ -105,7 +113,7 @@ class BaseDocumentsMixin:
|
|
105
113
|
image_resolution_dpi=image_resolution_dpi,
|
106
114
|
browser_canvas=browser_canvas,
|
107
115
|
)
|
108
|
-
return PreparedRequest(method="POST", url="/v1/documents/parse", data=parse_request.model_dump(), idempotency_key=idempotency_key)
|
116
|
+
return PreparedRequest(method="POST", url="/v1/documents/parse", data=parse_request.model_dump(mode="json", exclude_unset=True), idempotency_key=idempotency_key)
|
109
117
|
|
110
118
|
|
111
119
|
class Documents(SyncAPIResource, BaseDocumentsMixin):
|
@@ -145,8 +153,8 @@ class Documents(SyncAPIResource, BaseDocumentsMixin):
|
|
145
153
|
self,
|
146
154
|
document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl,
|
147
155
|
modality: Modality = "native",
|
148
|
-
image_resolution_dpi: int =
|
149
|
-
browser_canvas: BrowserCanvas =
|
156
|
+
image_resolution_dpi: int = FieldUnset,
|
157
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
150
158
|
idempotency_key: str | None = None,
|
151
159
|
) -> DocumentMessage:
|
152
160
|
"""
|
@@ -175,8 +183,8 @@ class Documents(SyncAPIResource, BaseDocumentsMixin):
|
|
175
183
|
document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl,
|
176
184
|
json_schema: dict[str, Any] | Path | str,
|
177
185
|
modality: Modality = "native",
|
178
|
-
image_resolution_dpi: int =
|
179
|
-
browser_canvas: BrowserCanvas =
|
186
|
+
image_resolution_dpi: int = FieldUnset,
|
187
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
180
188
|
idempotency_key: str | None = None,
|
181
189
|
) -> DocumentMessage:
|
182
190
|
"""
|
@@ -212,12 +220,12 @@ class Documents(SyncAPIResource, BaseDocumentsMixin):
|
|
212
220
|
model: str,
|
213
221
|
document: Path | str | IOBase | HttpUrl | None = None,
|
214
222
|
documents: list[Path | str | IOBase | HttpUrl] | None = None,
|
215
|
-
image_resolution_dpi: int =
|
216
|
-
browser_canvas: BrowserCanvas =
|
217
|
-
temperature: float =
|
218
|
-
modality: Modality =
|
219
|
-
reasoning_effort: ChatCompletionReasoningEffort =
|
220
|
-
n_consensus: int =
|
223
|
+
image_resolution_dpi: int = FieldUnset,
|
224
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
225
|
+
temperature: float = FieldUnset,
|
226
|
+
modality: Modality = FieldUnset,
|
227
|
+
reasoning_effort: ChatCompletionReasoningEffort = FieldUnset,
|
228
|
+
n_consensus: int = FieldUnset,
|
221
229
|
idempotency_key: str | None = None,
|
222
230
|
store: bool = False,
|
223
231
|
) -> RetabParsedChatCompletion:
|
@@ -264,20 +272,29 @@ class Documents(SyncAPIResource, BaseDocumentsMixin):
|
|
264
272
|
else:
|
265
273
|
raise ValueError("Must provide either 'document' or 'documents' parameter.")
|
266
274
|
|
275
|
+
# Build request dictionary with only provided fields
|
276
|
+
request_dict = {
|
277
|
+
"json_schema": json_schema,
|
278
|
+
"documents": processed_documents,
|
279
|
+
"model": model,
|
280
|
+
"stream": False,
|
281
|
+
"store": store,
|
282
|
+
}
|
283
|
+
if temperature is not FieldUnset:
|
284
|
+
request_dict["temperature"] = temperature
|
285
|
+
if modality is not FieldUnset:
|
286
|
+
request_dict["modality"] = modality
|
287
|
+
if reasoning_effort is not FieldUnset:
|
288
|
+
request_dict["reasoning_effort"] = reasoning_effort
|
289
|
+
if n_consensus is not FieldUnset:
|
290
|
+
request_dict["n_consensus"] = n_consensus
|
291
|
+
if image_resolution_dpi is not FieldUnset:
|
292
|
+
request_dict["image_resolution_dpi"] = image_resolution_dpi
|
293
|
+
if browser_canvas is not FieldUnset:
|
294
|
+
request_dict["browser_canvas"] = browser_canvas
|
295
|
+
|
267
296
|
# Validate DocumentAPIRequest data (raises exception if invalid)
|
268
|
-
request = DocumentExtractRequest(
|
269
|
-
json_schema=json_schema,
|
270
|
-
documents=processed_documents,
|
271
|
-
model=model,
|
272
|
-
temperature=temperature,
|
273
|
-
stream=False,
|
274
|
-
modality=modality,
|
275
|
-
store=store,
|
276
|
-
reasoning_effort=reasoning_effort,
|
277
|
-
n_consensus=n_consensus,
|
278
|
-
image_resolution_dpi=image_resolution_dpi,
|
279
|
-
browser_canvas=browser_canvas,
|
280
|
-
)
|
297
|
+
request = DocumentExtractRequest(**request_dict)
|
281
298
|
|
282
299
|
prepared_request = PreparedRequest(
|
283
300
|
method="POST", url="/v1/documents/extract", data=request.model_dump(mode="json", exclude_unset=True, exclude_defaults=True), idempotency_key=idempotency_key
|
@@ -340,8 +357,8 @@ class AsyncDocuments(AsyncAPIResource, BaseDocumentsMixin):
|
|
340
357
|
self,
|
341
358
|
document: Path | str | IOBase | MIMEData | PIL.Image.Image,
|
342
359
|
modality: Modality = "native",
|
343
|
-
image_resolution_dpi: int =
|
344
|
-
browser_canvas: BrowserCanvas =
|
360
|
+
image_resolution_dpi: int = FieldUnset,
|
361
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
345
362
|
idempotency_key: str | None = None,
|
346
363
|
) -> DocumentMessage:
|
347
364
|
"""
|
@@ -372,8 +389,8 @@ class AsyncDocuments(AsyncAPIResource, BaseDocumentsMixin):
|
|
372
389
|
document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl,
|
373
390
|
json_schema: dict[str, Any] | Path | str,
|
374
391
|
modality: Modality = "native",
|
375
|
-
image_resolution_dpi: int =
|
376
|
-
browser_canvas: BrowserCanvas =
|
392
|
+
image_resolution_dpi: int = FieldUnset,
|
393
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
377
394
|
idempotency_key: str | None = None,
|
378
395
|
) -> DocumentMessage:
|
379
396
|
"""
|
@@ -434,12 +451,12 @@ class AsyncDocuments(AsyncAPIResource, BaseDocumentsMixin):
|
|
434
451
|
model: str,
|
435
452
|
document: Path | str | IOBase | HttpUrl | None = None,
|
436
453
|
documents: list[Path | str | IOBase | HttpUrl] | None = None,
|
437
|
-
image_resolution_dpi: int =
|
438
|
-
browser_canvas: BrowserCanvas =
|
439
|
-
temperature: float =
|
440
|
-
modality: Modality =
|
441
|
-
reasoning_effort: ChatCompletionReasoningEffort =
|
442
|
-
n_consensus: int =
|
454
|
+
image_resolution_dpi: int = FieldUnset,
|
455
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
456
|
+
temperature: float = FieldUnset,
|
457
|
+
modality: Modality = FieldUnset,
|
458
|
+
reasoning_effort: ChatCompletionReasoningEffort = FieldUnset,
|
459
|
+
n_consensus: int = FieldUnset,
|
443
460
|
idempotency_key: str | None = None,
|
444
461
|
store: bool = False,
|
445
462
|
) -> RetabParsedChatCompletion:
|
@@ -486,20 +503,29 @@ class AsyncDocuments(AsyncAPIResource, BaseDocumentsMixin):
|
|
486
503
|
else:
|
487
504
|
raise ValueError("Must provide either 'document' or 'documents' parameter.")
|
488
505
|
|
506
|
+
# Build request dictionary with only provided fields
|
507
|
+
request_dict = {
|
508
|
+
"json_schema": json_schema,
|
509
|
+
"documents": processed_documents,
|
510
|
+
"model": model,
|
511
|
+
"stream": False,
|
512
|
+
"store": store,
|
513
|
+
}
|
514
|
+
if temperature is not FieldUnset:
|
515
|
+
request_dict["temperature"] = temperature
|
516
|
+
if modality is not FieldUnset:
|
517
|
+
request_dict["modality"] = modality
|
518
|
+
if reasoning_effort is not FieldUnset:
|
519
|
+
request_dict["reasoning_effort"] = reasoning_effort
|
520
|
+
if n_consensus is not FieldUnset:
|
521
|
+
request_dict["n_consensus"] = n_consensus
|
522
|
+
if image_resolution_dpi is not FieldUnset:
|
523
|
+
request_dict["image_resolution_dpi"] = image_resolution_dpi
|
524
|
+
if browser_canvas is not FieldUnset:
|
525
|
+
request_dict["browser_canvas"] = browser_canvas
|
526
|
+
|
489
527
|
# Validate DocumentAPIRequest data (raises exception if invalid)
|
490
|
-
request = DocumentExtractRequest(
|
491
|
-
json_schema=json_schema,
|
492
|
-
documents=processed_documents,
|
493
|
-
model=model,
|
494
|
-
temperature=temperature,
|
495
|
-
stream=False,
|
496
|
-
modality=modality,
|
497
|
-
store=store,
|
498
|
-
reasoning_effort=reasoning_effort,
|
499
|
-
n_consensus=n_consensus,
|
500
|
-
image_resolution_dpi=image_resolution_dpi,
|
501
|
-
browser_canvas=browser_canvas,
|
502
|
-
)
|
528
|
+
request = DocumentExtractRequest(**request_dict)
|
503
529
|
|
504
530
|
prepared_request = PreparedRequest(
|
505
531
|
method="POST", url="/v1/documents/extract", data=request.model_dump(mode="json", exclude_unset=True, exclude_defaults=True), idempotency_key=idempotency_key
|
@@ -10,7 +10,6 @@ from openai.types.chat.chat_completion_reasoning_effort import ChatCompletionRea
|
|
10
10
|
from openai.types.chat.parsed_chat_completion import ParsedChatCompletionMessage
|
11
11
|
from openai.types.responses.response import Response
|
12
12
|
from openai.types.responses.response_input_param import ResponseInputItemParam
|
13
|
-
from pydantic_core import PydanticUndefined
|
14
13
|
from pydantic import HttpUrl
|
15
14
|
|
16
15
|
from ..._resource import AsyncAPIResource, SyncAPIResource
|
@@ -23,7 +22,7 @@ from ...types.documents.extractions import DocumentExtractRequest, LogExtraction
|
|
23
22
|
from ...types.browser_canvas import BrowserCanvas
|
24
23
|
from ...types.modalities import Modality
|
25
24
|
from ...types.schemas.object import Schema
|
26
|
-
from ...types.standards import PreparedRequest
|
25
|
+
from ...types.standards import PreparedRequest, FieldUnset
|
27
26
|
|
28
27
|
|
29
28
|
def maybe_parse_to_pydantic(schema: Schema, response: RetabParsedChatCompletion, allow_partial: bool = False) -> RetabParsedChatCompletion:
|
@@ -44,14 +43,14 @@ class BaseExtractionsMixin:
|
|
44
43
|
json_schema: dict[str, Any] | Path | str,
|
45
44
|
document: Path | str | IOBase | HttpUrl | None = None,
|
46
45
|
documents: list[Path | str | IOBase | HttpUrl] | None = None,
|
47
|
-
image_resolution_dpi: int =
|
48
|
-
browser_canvas: BrowserCanvas =
|
49
|
-
model: str =
|
50
|
-
temperature: float =
|
51
|
-
modality: Modality =
|
52
|
-
reasoning_effort: ChatCompletionReasoningEffort =
|
46
|
+
image_resolution_dpi: int = FieldUnset,
|
47
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
48
|
+
model: str = FieldUnset,
|
49
|
+
temperature: float = FieldUnset,
|
50
|
+
modality: Modality = FieldUnset,
|
51
|
+
reasoning_effort: ChatCompletionReasoningEffort = FieldUnset,
|
53
52
|
stream: bool = False,
|
54
|
-
n_consensus: int =
|
53
|
+
n_consensus: int = FieldUnset,
|
55
54
|
store: bool = False,
|
56
55
|
idempotency_key: str | None = None,
|
57
56
|
) -> PreparedRequest:
|
@@ -71,20 +70,30 @@ class BaseExtractionsMixin:
|
|
71
70
|
else:
|
72
71
|
raise ValueError("Must provide either 'document' or 'documents' parameter.")
|
73
72
|
|
73
|
+
# Build request dictionary with only provided fields
|
74
|
+
request_dict = {
|
75
|
+
'json_schema': json_schema,
|
76
|
+
'documents': processed_documents,
|
77
|
+
'stream': stream,
|
78
|
+
'store': store,
|
79
|
+
}
|
80
|
+
if model is not FieldUnset:
|
81
|
+
request_dict['model'] = model
|
82
|
+
if temperature is not FieldUnset:
|
83
|
+
request_dict['temperature'] = temperature
|
84
|
+
if modality is not FieldUnset:
|
85
|
+
request_dict['modality'] = modality
|
86
|
+
if reasoning_effort is not FieldUnset:
|
87
|
+
request_dict['reasoning_effort'] = reasoning_effort
|
88
|
+
if n_consensus is not FieldUnset:
|
89
|
+
request_dict['n_consensus'] = n_consensus
|
90
|
+
if image_resolution_dpi is not FieldUnset:
|
91
|
+
request_dict['image_resolution_dpi'] = image_resolution_dpi
|
92
|
+
if browser_canvas is not FieldUnset:
|
93
|
+
request_dict['browser_canvas'] = browser_canvas
|
94
|
+
|
74
95
|
# Validate DocumentAPIRequest data (raises exception if invalid)
|
75
|
-
request = DocumentExtractRequest(
|
76
|
-
json_schema=json_schema,
|
77
|
-
documents=processed_documents,
|
78
|
-
model=model,
|
79
|
-
temperature=temperature,
|
80
|
-
stream=stream,
|
81
|
-
modality=modality,
|
82
|
-
store=store,
|
83
|
-
reasoning_effort=reasoning_effort,
|
84
|
-
n_consensus=n_consensus,
|
85
|
-
image_resolution_dpi=image_resolution_dpi,
|
86
|
-
browser_canvas=browser_canvas,
|
87
|
-
)
|
96
|
+
request = DocumentExtractRequest(**request_dict)
|
88
97
|
|
89
98
|
return PreparedRequest(
|
90
99
|
method="POST", url="/v1/documents/extractions", data=request.model_dump(mode="json", exclude_unset=True, exclude_defaults=True), idempotency_key=idempotency_key
|
@@ -144,12 +153,12 @@ class Extractions(SyncAPIResource, BaseExtractionsMixin):
|
|
144
153
|
model: str,
|
145
154
|
document: Path | str | IOBase | HttpUrl | None = None,
|
146
155
|
documents: list[Path | str | IOBase | HttpUrl] | None = None,
|
147
|
-
image_resolution_dpi: int =
|
148
|
-
browser_canvas: BrowserCanvas =
|
149
|
-
temperature: float =
|
150
|
-
modality: Modality =
|
151
|
-
reasoning_effort: ChatCompletionReasoningEffort =
|
152
|
-
n_consensus: int =
|
156
|
+
image_resolution_dpi: int = FieldUnset,
|
157
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
158
|
+
temperature: float = FieldUnset,
|
159
|
+
modality: Modality = FieldUnset,
|
160
|
+
reasoning_effort: ChatCompletionReasoningEffort = FieldUnset,
|
161
|
+
n_consensus: int = FieldUnset,
|
153
162
|
idempotency_key: str | None = None,
|
154
163
|
store: bool = False,
|
155
164
|
) -> RetabParsedChatCompletion:
|
@@ -204,12 +213,12 @@ class Extractions(SyncAPIResource, BaseExtractionsMixin):
|
|
204
213
|
model: str,
|
205
214
|
document: Path | str | IOBase | HttpUrl | None = None,
|
206
215
|
documents: list[Path | str | IOBase | HttpUrl] | None = None,
|
207
|
-
image_resolution_dpi: int =
|
208
|
-
browser_canvas: BrowserCanvas =
|
209
|
-
temperature: float =
|
210
|
-
modality: Modality =
|
211
|
-
reasoning_effort: ChatCompletionReasoningEffort =
|
212
|
-
n_consensus: int =
|
216
|
+
image_resolution_dpi: int = FieldUnset,
|
217
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
218
|
+
temperature: float = FieldUnset,
|
219
|
+
modality: Modality = FieldUnset,
|
220
|
+
reasoning_effort: ChatCompletionReasoningEffort = FieldUnset,
|
221
|
+
n_consensus: int = FieldUnset,
|
213
222
|
idempotency_key: str | None = None,
|
214
223
|
store: bool = False,
|
215
224
|
) -> Generator[RetabParsedChatCompletion, None, None]:
|
@@ -345,12 +354,12 @@ class AsyncExtractions(AsyncAPIResource, BaseExtractionsMixin):
|
|
345
354
|
model: str,
|
346
355
|
document: Path | str | IOBase | HttpUrl | None = None,
|
347
356
|
documents: list[Path | str | IOBase | HttpUrl] | None = None,
|
348
|
-
image_resolution_dpi: int =
|
349
|
-
browser_canvas: BrowserCanvas =
|
350
|
-
temperature: float =
|
351
|
-
modality: Modality =
|
352
|
-
reasoning_effort: ChatCompletionReasoningEffort =
|
353
|
-
n_consensus: int =
|
357
|
+
image_resolution_dpi: int = FieldUnset,
|
358
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
359
|
+
temperature: float = FieldUnset,
|
360
|
+
modality: Modality = FieldUnset,
|
361
|
+
reasoning_effort: ChatCompletionReasoningEffort = FieldUnset,
|
362
|
+
n_consensus: int = FieldUnset,
|
354
363
|
idempotency_key: str | None = None,
|
355
364
|
store: bool = False,
|
356
365
|
) -> RetabParsedChatCompletion:
|
@@ -401,12 +410,12 @@ class AsyncExtractions(AsyncAPIResource, BaseExtractionsMixin):
|
|
401
410
|
model: str,
|
402
411
|
document: Path | str | IOBase | HttpUrl | None = None,
|
403
412
|
documents: list[Path | str | IOBase | HttpUrl] | None = None,
|
404
|
-
image_resolution_dpi: int =
|
405
|
-
browser_canvas: BrowserCanvas =
|
406
|
-
temperature: float =
|
407
|
-
modality: Modality =
|
408
|
-
reasoning_effort: ChatCompletionReasoningEffort =
|
409
|
-
n_consensus: int =
|
413
|
+
image_resolution_dpi: int = FieldUnset,
|
414
|
+
browser_canvas: BrowserCanvas = FieldUnset,
|
415
|
+
temperature: float = FieldUnset,
|
416
|
+
modality: Modality = FieldUnset,
|
417
|
+
reasoning_effort: ChatCompletionReasoningEffort = FieldUnset,
|
418
|
+
n_consensus: int = FieldUnset,
|
410
419
|
idempotency_key: str | None = None,
|
411
420
|
store: bool = False,
|
412
421
|
) -> AsyncGenerator[RetabParsedChatCompletion, None]:
|
@@ -1,3 +1,3 @@
|
|
1
|
-
from .client import
|
1
|
+
from .client import AsyncProjects, Projects
|
2
2
|
|
3
|
-
__all__ = ["
|
3
|
+
__all__ = ["Projects", "AsyncProjects"]
|