llama-cloud 0.1.12__py3-none-any.whl → 0.1.13__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.
Potentially problematic release.
This version of llama-cloud might be problematic. Click here for more details.
- llama_cloud/__init__.py +2 -2
- llama_cloud/resources/llama_extract/client.py +16 -4
- llama_cloud/resources/parsing/client.py +131 -88
- llama_cloud/types/__init__.py +2 -2
- llama_cloud/types/eval_dataset_job_record.py +1 -2
- llama_cloud/types/job_record.py +2 -3
- llama_cloud/types/llama_parse_parameters.py +6 -0
- llama_cloud/types/llm_parameters.py +1 -0
- llama_cloud/types/page_screenshot_metadata.py +1 -0
- llama_cloud/types/parsing_mode.py +37 -0
- {llama_cloud-0.1.12.dist-info → llama_cloud-0.1.13.dist-info}/METADATA +1 -2
- {llama_cloud-0.1.12.dist-info → llama_cloud-0.1.13.dist-info}/RECORD +14 -14
- {llama_cloud-0.1.12.dist-info → llama_cloud-0.1.13.dist-info}/WHEEL +1 -1
- llama_cloud/types/base.py +0 -29
- {llama_cloud-0.1.12.dist-info → llama_cloud-0.1.13.dist-info}/LICENSE +0 -0
llama_cloud/__init__.py
CHANGED
|
@@ -16,7 +16,6 @@ from .types import (
|
|
|
16
16
|
AutoTransformConfig,
|
|
17
17
|
AzureOpenAiEmbedding,
|
|
18
18
|
AzureOpenAiEmbeddingConfig,
|
|
19
|
-
Base,
|
|
20
19
|
BasePromptTemplate,
|
|
21
20
|
BedrockEmbedding,
|
|
22
21
|
BedrockEmbeddingConfig,
|
|
@@ -191,6 +190,7 @@ from .types import (
|
|
|
191
190
|
ParsingJobMarkdownResult,
|
|
192
191
|
ParsingJobStructuredResult,
|
|
193
192
|
ParsingJobTextResult,
|
|
193
|
+
ParsingMode,
|
|
194
194
|
ParsingUsage,
|
|
195
195
|
PartitionNames,
|
|
196
196
|
Permission,
|
|
@@ -366,7 +366,6 @@ __all__ = [
|
|
|
366
366
|
"AutoTransformConfig",
|
|
367
367
|
"AzureOpenAiEmbedding",
|
|
368
368
|
"AzureOpenAiEmbeddingConfig",
|
|
369
|
-
"Base",
|
|
370
369
|
"BasePromptTemplate",
|
|
371
370
|
"BedrockEmbedding",
|
|
372
371
|
"BedrockEmbeddingConfig",
|
|
@@ -562,6 +561,7 @@ __all__ = [
|
|
|
562
561
|
"ParsingJobMarkdownResult",
|
|
563
562
|
"ParsingJobStructuredResult",
|
|
564
563
|
"ParsingJobTextResult",
|
|
564
|
+
"ParsingMode",
|
|
565
565
|
"ParsingUsage",
|
|
566
566
|
"PartitionNames",
|
|
567
567
|
"Permission",
|
|
@@ -424,6 +424,7 @@ class LlamaExtractClient:
|
|
|
424
424
|
ExtractTarget,
|
|
425
425
|
LlamaExtractSettings,
|
|
426
426
|
LlamaParseParameters,
|
|
427
|
+
ParsingMode,
|
|
427
428
|
)
|
|
428
429
|
from llama_cloud.client import LlamaCloud
|
|
429
430
|
|
|
@@ -441,7 +442,9 @@ class LlamaExtractClient:
|
|
|
441
442
|
),
|
|
442
443
|
extract_settings=LlamaExtractSettings(
|
|
443
444
|
chunk_mode=ChunkMode.PAGE,
|
|
444
|
-
llama_parse_params=LlamaParseParameters(
|
|
445
|
+
llama_parse_params=LlamaParseParameters(
|
|
446
|
+
parse_mode=ParsingMode.PARSE_PAGE_WITHOUT_LLM,
|
|
447
|
+
),
|
|
445
448
|
),
|
|
446
449
|
)
|
|
447
450
|
"""
|
|
@@ -526,6 +529,7 @@ class LlamaExtractClient:
|
|
|
526
529
|
ExtractTarget,
|
|
527
530
|
LlamaExtractSettings,
|
|
528
531
|
LlamaParseParameters,
|
|
532
|
+
ParsingMode,
|
|
529
533
|
)
|
|
530
534
|
from llama_cloud.client import LlamaCloud
|
|
531
535
|
|
|
@@ -543,7 +547,9 @@ class LlamaExtractClient:
|
|
|
543
547
|
),
|
|
544
548
|
extract_settings=LlamaExtractSettings(
|
|
545
549
|
chunk_mode=ChunkMode.PAGE,
|
|
546
|
-
llama_parse_params=LlamaParseParameters(
|
|
550
|
+
llama_parse_params=LlamaParseParameters(
|
|
551
|
+
parse_mode=ParsingMode.PARSE_PAGE_WITHOUT_LLM,
|
|
552
|
+
),
|
|
547
553
|
),
|
|
548
554
|
)
|
|
549
555
|
"""
|
|
@@ -1083,6 +1089,7 @@ class AsyncLlamaExtractClient:
|
|
|
1083
1089
|
ExtractTarget,
|
|
1084
1090
|
LlamaExtractSettings,
|
|
1085
1091
|
LlamaParseParameters,
|
|
1092
|
+
ParsingMode,
|
|
1086
1093
|
)
|
|
1087
1094
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1088
1095
|
|
|
@@ -1100,7 +1107,9 @@ class AsyncLlamaExtractClient:
|
|
|
1100
1107
|
),
|
|
1101
1108
|
extract_settings=LlamaExtractSettings(
|
|
1102
1109
|
chunk_mode=ChunkMode.PAGE,
|
|
1103
|
-
llama_parse_params=LlamaParseParameters(
|
|
1110
|
+
llama_parse_params=LlamaParseParameters(
|
|
1111
|
+
parse_mode=ParsingMode.PARSE_PAGE_WITHOUT_LLM,
|
|
1112
|
+
),
|
|
1104
1113
|
),
|
|
1105
1114
|
)
|
|
1106
1115
|
"""
|
|
@@ -1185,6 +1194,7 @@ class AsyncLlamaExtractClient:
|
|
|
1185
1194
|
ExtractTarget,
|
|
1186
1195
|
LlamaExtractSettings,
|
|
1187
1196
|
LlamaParseParameters,
|
|
1197
|
+
ParsingMode,
|
|
1188
1198
|
)
|
|
1189
1199
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1190
1200
|
|
|
@@ -1202,7 +1212,9 @@ class AsyncLlamaExtractClient:
|
|
|
1202
1212
|
),
|
|
1203
1213
|
extract_settings=LlamaExtractSettings(
|
|
1204
1214
|
chunk_mode=ChunkMode.PAGE,
|
|
1205
|
-
llama_parse_params=LlamaParseParameters(
|
|
1215
|
+
llama_parse_params=LlamaParseParameters(
|
|
1216
|
+
parse_mode=ParsingMode.PARSE_PAGE_WITHOUT_LLM,
|
|
1217
|
+
),
|
|
1206
1218
|
),
|
|
1207
1219
|
)
|
|
1208
1220
|
"""
|
|
@@ -18,6 +18,7 @@ from ...types.parsing_job_json_result import ParsingJobJsonResult
|
|
|
18
18
|
from ...types.parsing_job_markdown_result import ParsingJobMarkdownResult
|
|
19
19
|
from ...types.parsing_job_structured_result import ParsingJobStructuredResult
|
|
20
20
|
from ...types.parsing_job_text_result import ParsingJobTextResult
|
|
21
|
+
from ...types.parsing_mode import ParsingMode
|
|
21
22
|
from ...types.parsing_usage import ParsingUsage
|
|
22
23
|
from ...types.presigned_url import PresignedUrl
|
|
23
24
|
|
|
@@ -210,17 +211,12 @@ class ParsingClient:
|
|
|
210
211
|
bbox_left: float,
|
|
211
212
|
bbox_right: float,
|
|
212
213
|
bbox_top: float,
|
|
213
|
-
complemental_formatting_instruction: str,
|
|
214
|
-
content_guideline_instruction: str,
|
|
215
|
-
continuous_mode: bool,
|
|
216
214
|
disable_ocr: bool,
|
|
217
215
|
disable_reconstruction: bool,
|
|
218
216
|
disable_image_extraction: bool,
|
|
219
217
|
do_not_cache: bool,
|
|
220
218
|
do_not_unroll_columns: bool,
|
|
221
219
|
extract_charts: bool,
|
|
222
|
-
fast_mode: bool,
|
|
223
|
-
formatting_instruction: str,
|
|
224
220
|
guess_xlsx_sheet_name: bool,
|
|
225
221
|
html_make_all_elements_visible: bool,
|
|
226
222
|
html_remove_fixed_elements: bool,
|
|
@@ -230,7 +226,6 @@ class ParsingClient:
|
|
|
230
226
|
input_s_3_region: str,
|
|
231
227
|
input_url: str,
|
|
232
228
|
invalidate_cache: bool,
|
|
233
|
-
is_formatting_instruction: bool,
|
|
234
229
|
language: typing.List[ParserLanguages],
|
|
235
230
|
extract_layout: bool,
|
|
236
231
|
max_pages: typing.Optional[int] = OMIT,
|
|
@@ -240,8 +235,7 @@ class ParsingClient:
|
|
|
240
235
|
page_prefix: str,
|
|
241
236
|
page_separator: str,
|
|
242
237
|
page_suffix: str,
|
|
243
|
-
|
|
244
|
-
premium_mode: bool,
|
|
238
|
+
preserve_layout_alignment_across_pages: bool,
|
|
245
239
|
skip_diagonal_text: bool,
|
|
246
240
|
spreadsheet_extract_sub_tables: bool,
|
|
247
241
|
structured_output: bool,
|
|
@@ -249,13 +243,13 @@ class ParsingClient:
|
|
|
249
243
|
structured_output_json_schema_name: str,
|
|
250
244
|
take_screenshot: bool,
|
|
251
245
|
target_pages: str,
|
|
252
|
-
use_vendor_multimodal_model: bool,
|
|
253
246
|
vendor_multimodal_api_key: str,
|
|
254
247
|
vendor_multimodal_model_name: str,
|
|
255
248
|
webhook_url: str,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
249
|
+
parse_mode: typing.Optional[ParsingMode] = OMIT,
|
|
250
|
+
system_prompt: str,
|
|
251
|
+
system_prompt_append: str,
|
|
252
|
+
user_prompt: str,
|
|
259
253
|
job_timeout_in_seconds: float,
|
|
260
254
|
job_timeout_extra_time_per_page_in_seconds: float,
|
|
261
255
|
strict_mode_image_extraction: bool,
|
|
@@ -264,6 +258,18 @@ class ParsingClient:
|
|
|
264
258
|
strict_mode_buggy_font: bool,
|
|
265
259
|
ignore_document_elements_for_layout_detection: bool,
|
|
266
260
|
output_tables_as_html: bool,
|
|
261
|
+
use_vendor_multimodal_model: bool,
|
|
262
|
+
bounding_box: str,
|
|
263
|
+
gpt_4_o_mode: bool,
|
|
264
|
+
gpt_4_o_api_key: str,
|
|
265
|
+
complemental_formatting_instruction: str,
|
|
266
|
+
content_guideline_instruction: str,
|
|
267
|
+
premium_mode: bool,
|
|
268
|
+
is_formatting_instruction: bool,
|
|
269
|
+
continuous_mode: bool,
|
|
270
|
+
parsing_instruction: str,
|
|
271
|
+
fast_mode: bool,
|
|
272
|
+
formatting_instruction: str,
|
|
267
273
|
) -> ParsingJob:
|
|
268
274
|
"""
|
|
269
275
|
Upload a file to s3 and create a job. return a job id
|
|
@@ -303,12 +309,6 @@ class ParsingClient:
|
|
|
303
309
|
|
|
304
310
|
- bbox_top: float.
|
|
305
311
|
|
|
306
|
-
- complemental_formatting_instruction: str.
|
|
307
|
-
|
|
308
|
-
- content_guideline_instruction: str.
|
|
309
|
-
|
|
310
|
-
- continuous_mode: bool.
|
|
311
|
-
|
|
312
312
|
- disable_ocr: bool.
|
|
313
313
|
|
|
314
314
|
- disable_reconstruction: bool.
|
|
@@ -321,10 +321,6 @@ class ParsingClient:
|
|
|
321
321
|
|
|
322
322
|
- extract_charts: bool.
|
|
323
323
|
|
|
324
|
-
- fast_mode: bool.
|
|
325
|
-
|
|
326
|
-
- formatting_instruction: str.
|
|
327
|
-
|
|
328
324
|
- guess_xlsx_sheet_name: bool.
|
|
329
325
|
|
|
330
326
|
- html_make_all_elements_visible: bool.
|
|
@@ -343,8 +339,6 @@ class ParsingClient:
|
|
|
343
339
|
|
|
344
340
|
- invalidate_cache: bool.
|
|
345
341
|
|
|
346
|
-
- is_formatting_instruction: bool.
|
|
347
|
-
|
|
348
342
|
- language: typing.List[ParserLanguages].
|
|
349
343
|
|
|
350
344
|
- extract_layout: bool.
|
|
@@ -363,9 +357,7 @@ class ParsingClient:
|
|
|
363
357
|
|
|
364
358
|
- page_suffix: str.
|
|
365
359
|
|
|
366
|
-
-
|
|
367
|
-
|
|
368
|
-
- premium_mode: bool.
|
|
360
|
+
- preserve_layout_alignment_across_pages: bool.
|
|
369
361
|
|
|
370
362
|
- skip_diagonal_text: bool.
|
|
371
363
|
|
|
@@ -381,19 +373,19 @@ class ParsingClient:
|
|
|
381
373
|
|
|
382
374
|
- target_pages: str.
|
|
383
375
|
|
|
384
|
-
- use_vendor_multimodal_model: bool.
|
|
385
|
-
|
|
386
376
|
- vendor_multimodal_api_key: str.
|
|
387
377
|
|
|
388
378
|
- vendor_multimodal_model_name: str.
|
|
389
379
|
|
|
390
380
|
- webhook_url: str.
|
|
391
381
|
|
|
392
|
-
-
|
|
382
|
+
- parse_mode: typing.Optional[ParsingMode].
|
|
393
383
|
|
|
394
|
-
-
|
|
384
|
+
- system_prompt: str.
|
|
395
385
|
|
|
396
|
-
-
|
|
386
|
+
- system_prompt_append: str.
|
|
387
|
+
|
|
388
|
+
- user_prompt: str.
|
|
397
389
|
|
|
398
390
|
- job_timeout_in_seconds: float.
|
|
399
391
|
|
|
@@ -410,6 +402,30 @@ class ParsingClient:
|
|
|
410
402
|
- ignore_document_elements_for_layout_detection: bool.
|
|
411
403
|
|
|
412
404
|
- output_tables_as_html: bool.
|
|
405
|
+
|
|
406
|
+
- use_vendor_multimodal_model: bool.
|
|
407
|
+
|
|
408
|
+
- bounding_box: str.
|
|
409
|
+
|
|
410
|
+
- gpt_4_o_mode: bool.
|
|
411
|
+
|
|
412
|
+
- gpt_4_o_api_key: str.
|
|
413
|
+
|
|
414
|
+
- complemental_formatting_instruction: str.
|
|
415
|
+
|
|
416
|
+
- content_guideline_instruction: str.
|
|
417
|
+
|
|
418
|
+
- premium_mode: bool.
|
|
419
|
+
|
|
420
|
+
- is_formatting_instruction: bool.
|
|
421
|
+
|
|
422
|
+
- continuous_mode: bool.
|
|
423
|
+
|
|
424
|
+
- parsing_instruction: str.
|
|
425
|
+
|
|
426
|
+
- fast_mode: bool.
|
|
427
|
+
|
|
428
|
+
- formatting_instruction: str.
|
|
413
429
|
"""
|
|
414
430
|
_request: typing.Dict[str, typing.Any] = {
|
|
415
431
|
"annotate_links": annotate_links,
|
|
@@ -426,17 +442,12 @@ class ParsingClient:
|
|
|
426
442
|
"bbox_left": bbox_left,
|
|
427
443
|
"bbox_right": bbox_right,
|
|
428
444
|
"bbox_top": bbox_top,
|
|
429
|
-
"complemental_formatting_instruction": complemental_formatting_instruction,
|
|
430
|
-
"content_guideline_instruction": content_guideline_instruction,
|
|
431
|
-
"continuous_mode": continuous_mode,
|
|
432
445
|
"disable_ocr": disable_ocr,
|
|
433
446
|
"disable_reconstruction": disable_reconstruction,
|
|
434
447
|
"disable_image_extraction": disable_image_extraction,
|
|
435
448
|
"do_not_cache": do_not_cache,
|
|
436
449
|
"do_not_unroll_columns": do_not_unroll_columns,
|
|
437
450
|
"extract_charts": extract_charts,
|
|
438
|
-
"fast_mode": fast_mode,
|
|
439
|
-
"formatting_instruction": formatting_instruction,
|
|
440
451
|
"guess_xlsx_sheet_name": guess_xlsx_sheet_name,
|
|
441
452
|
"html_make_all_elements_visible": html_make_all_elements_visible,
|
|
442
453
|
"html_remove_fixed_elements": html_remove_fixed_elements,
|
|
@@ -446,7 +457,6 @@ class ParsingClient:
|
|
|
446
457
|
"input_s3_region": input_s_3_region,
|
|
447
458
|
"input_url": input_url,
|
|
448
459
|
"invalidate_cache": invalidate_cache,
|
|
449
|
-
"is_formatting_instruction": is_formatting_instruction,
|
|
450
460
|
"language": language,
|
|
451
461
|
"extract_layout": extract_layout,
|
|
452
462
|
"output_pdf_of_document": output_pdf_of_document,
|
|
@@ -455,8 +465,7 @@ class ParsingClient:
|
|
|
455
465
|
"page_prefix": page_prefix,
|
|
456
466
|
"page_separator": page_separator,
|
|
457
467
|
"page_suffix": page_suffix,
|
|
458
|
-
"
|
|
459
|
-
"premium_mode": premium_mode,
|
|
468
|
+
"preserve_layout_alignment_across_pages": preserve_layout_alignment_across_pages,
|
|
460
469
|
"skip_diagonal_text": skip_diagonal_text,
|
|
461
470
|
"spreadsheet_extract_sub_tables": spreadsheet_extract_sub_tables,
|
|
462
471
|
"structured_output": structured_output,
|
|
@@ -464,13 +473,12 @@ class ParsingClient:
|
|
|
464
473
|
"structured_output_json_schema_name": structured_output_json_schema_name,
|
|
465
474
|
"take_screenshot": take_screenshot,
|
|
466
475
|
"target_pages": target_pages,
|
|
467
|
-
"use_vendor_multimodal_model": use_vendor_multimodal_model,
|
|
468
476
|
"vendor_multimodal_api_key": vendor_multimodal_api_key,
|
|
469
477
|
"vendor_multimodal_model_name": vendor_multimodal_model_name,
|
|
470
478
|
"webhook_url": webhook_url,
|
|
471
|
-
"
|
|
472
|
-
"
|
|
473
|
-
"
|
|
479
|
+
"system_prompt": system_prompt,
|
|
480
|
+
"system_prompt_append": system_prompt_append,
|
|
481
|
+
"user_prompt": user_prompt,
|
|
474
482
|
"job_timeout_in_seconds": job_timeout_in_seconds,
|
|
475
483
|
"job_timeout_extra_time_per_page_in_seconds": job_timeout_extra_time_per_page_in_seconds,
|
|
476
484
|
"strict_mode_image_extraction": strict_mode_image_extraction,
|
|
@@ -479,11 +487,25 @@ class ParsingClient:
|
|
|
479
487
|
"strict_mode_buggy_font": strict_mode_buggy_font,
|
|
480
488
|
"ignore_document_elements_for_layout_detection": ignore_document_elements_for_layout_detection,
|
|
481
489
|
"output_tables_as_HTML": output_tables_as_html,
|
|
490
|
+
"use_vendor_multimodal_model": use_vendor_multimodal_model,
|
|
491
|
+
"bounding_box": bounding_box,
|
|
492
|
+
"gpt4o_mode": gpt_4_o_mode,
|
|
493
|
+
"gpt4o_api_key": gpt_4_o_api_key,
|
|
494
|
+
"complemental_formatting_instruction": complemental_formatting_instruction,
|
|
495
|
+
"content_guideline_instruction": content_guideline_instruction,
|
|
496
|
+
"premium_mode": premium_mode,
|
|
497
|
+
"is_formatting_instruction": is_formatting_instruction,
|
|
498
|
+
"continuous_mode": continuous_mode,
|
|
499
|
+
"parsing_instruction": parsing_instruction,
|
|
500
|
+
"fast_mode": fast_mode,
|
|
501
|
+
"formatting_instruction": formatting_instruction,
|
|
482
502
|
}
|
|
483
503
|
if file is not OMIT:
|
|
484
504
|
_request["file"] = file
|
|
485
505
|
if max_pages is not OMIT:
|
|
486
506
|
_request["max_pages"] = max_pages
|
|
507
|
+
if parse_mode is not OMIT:
|
|
508
|
+
_request["parse_mode"] = parse_mode
|
|
487
509
|
_response = self._client_wrapper.httpx_client.request(
|
|
488
510
|
"POST",
|
|
489
511
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/upload"),
|
|
@@ -1157,17 +1179,12 @@ class AsyncParsingClient:
|
|
|
1157
1179
|
bbox_left: float,
|
|
1158
1180
|
bbox_right: float,
|
|
1159
1181
|
bbox_top: float,
|
|
1160
|
-
complemental_formatting_instruction: str,
|
|
1161
|
-
content_guideline_instruction: str,
|
|
1162
|
-
continuous_mode: bool,
|
|
1163
1182
|
disable_ocr: bool,
|
|
1164
1183
|
disable_reconstruction: bool,
|
|
1165
1184
|
disable_image_extraction: bool,
|
|
1166
1185
|
do_not_cache: bool,
|
|
1167
1186
|
do_not_unroll_columns: bool,
|
|
1168
1187
|
extract_charts: bool,
|
|
1169
|
-
fast_mode: bool,
|
|
1170
|
-
formatting_instruction: str,
|
|
1171
1188
|
guess_xlsx_sheet_name: bool,
|
|
1172
1189
|
html_make_all_elements_visible: bool,
|
|
1173
1190
|
html_remove_fixed_elements: bool,
|
|
@@ -1177,7 +1194,6 @@ class AsyncParsingClient:
|
|
|
1177
1194
|
input_s_3_region: str,
|
|
1178
1195
|
input_url: str,
|
|
1179
1196
|
invalidate_cache: bool,
|
|
1180
|
-
is_formatting_instruction: bool,
|
|
1181
1197
|
language: typing.List[ParserLanguages],
|
|
1182
1198
|
extract_layout: bool,
|
|
1183
1199
|
max_pages: typing.Optional[int] = OMIT,
|
|
@@ -1187,8 +1203,7 @@ class AsyncParsingClient:
|
|
|
1187
1203
|
page_prefix: str,
|
|
1188
1204
|
page_separator: str,
|
|
1189
1205
|
page_suffix: str,
|
|
1190
|
-
|
|
1191
|
-
premium_mode: bool,
|
|
1206
|
+
preserve_layout_alignment_across_pages: bool,
|
|
1192
1207
|
skip_diagonal_text: bool,
|
|
1193
1208
|
spreadsheet_extract_sub_tables: bool,
|
|
1194
1209
|
structured_output: bool,
|
|
@@ -1196,13 +1211,13 @@ class AsyncParsingClient:
|
|
|
1196
1211
|
structured_output_json_schema_name: str,
|
|
1197
1212
|
take_screenshot: bool,
|
|
1198
1213
|
target_pages: str,
|
|
1199
|
-
use_vendor_multimodal_model: bool,
|
|
1200
1214
|
vendor_multimodal_api_key: str,
|
|
1201
1215
|
vendor_multimodal_model_name: str,
|
|
1202
1216
|
webhook_url: str,
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1217
|
+
parse_mode: typing.Optional[ParsingMode] = OMIT,
|
|
1218
|
+
system_prompt: str,
|
|
1219
|
+
system_prompt_append: str,
|
|
1220
|
+
user_prompt: str,
|
|
1206
1221
|
job_timeout_in_seconds: float,
|
|
1207
1222
|
job_timeout_extra_time_per_page_in_seconds: float,
|
|
1208
1223
|
strict_mode_image_extraction: bool,
|
|
@@ -1211,6 +1226,18 @@ class AsyncParsingClient:
|
|
|
1211
1226
|
strict_mode_buggy_font: bool,
|
|
1212
1227
|
ignore_document_elements_for_layout_detection: bool,
|
|
1213
1228
|
output_tables_as_html: bool,
|
|
1229
|
+
use_vendor_multimodal_model: bool,
|
|
1230
|
+
bounding_box: str,
|
|
1231
|
+
gpt_4_o_mode: bool,
|
|
1232
|
+
gpt_4_o_api_key: str,
|
|
1233
|
+
complemental_formatting_instruction: str,
|
|
1234
|
+
content_guideline_instruction: str,
|
|
1235
|
+
premium_mode: bool,
|
|
1236
|
+
is_formatting_instruction: bool,
|
|
1237
|
+
continuous_mode: bool,
|
|
1238
|
+
parsing_instruction: str,
|
|
1239
|
+
fast_mode: bool,
|
|
1240
|
+
formatting_instruction: str,
|
|
1214
1241
|
) -> ParsingJob:
|
|
1215
1242
|
"""
|
|
1216
1243
|
Upload a file to s3 and create a job. return a job id
|
|
@@ -1250,12 +1277,6 @@ class AsyncParsingClient:
|
|
|
1250
1277
|
|
|
1251
1278
|
- bbox_top: float.
|
|
1252
1279
|
|
|
1253
|
-
- complemental_formatting_instruction: str.
|
|
1254
|
-
|
|
1255
|
-
- content_guideline_instruction: str.
|
|
1256
|
-
|
|
1257
|
-
- continuous_mode: bool.
|
|
1258
|
-
|
|
1259
1280
|
- disable_ocr: bool.
|
|
1260
1281
|
|
|
1261
1282
|
- disable_reconstruction: bool.
|
|
@@ -1268,10 +1289,6 @@ class AsyncParsingClient:
|
|
|
1268
1289
|
|
|
1269
1290
|
- extract_charts: bool.
|
|
1270
1291
|
|
|
1271
|
-
- fast_mode: bool.
|
|
1272
|
-
|
|
1273
|
-
- formatting_instruction: str.
|
|
1274
|
-
|
|
1275
1292
|
- guess_xlsx_sheet_name: bool.
|
|
1276
1293
|
|
|
1277
1294
|
- html_make_all_elements_visible: bool.
|
|
@@ -1290,8 +1307,6 @@ class AsyncParsingClient:
|
|
|
1290
1307
|
|
|
1291
1308
|
- invalidate_cache: bool.
|
|
1292
1309
|
|
|
1293
|
-
- is_formatting_instruction: bool.
|
|
1294
|
-
|
|
1295
1310
|
- language: typing.List[ParserLanguages].
|
|
1296
1311
|
|
|
1297
1312
|
- extract_layout: bool.
|
|
@@ -1310,9 +1325,7 @@ class AsyncParsingClient:
|
|
|
1310
1325
|
|
|
1311
1326
|
- page_suffix: str.
|
|
1312
1327
|
|
|
1313
|
-
-
|
|
1314
|
-
|
|
1315
|
-
- premium_mode: bool.
|
|
1328
|
+
- preserve_layout_alignment_across_pages: bool.
|
|
1316
1329
|
|
|
1317
1330
|
- skip_diagonal_text: bool.
|
|
1318
1331
|
|
|
@@ -1328,19 +1341,19 @@ class AsyncParsingClient:
|
|
|
1328
1341
|
|
|
1329
1342
|
- target_pages: str.
|
|
1330
1343
|
|
|
1331
|
-
- use_vendor_multimodal_model: bool.
|
|
1332
|
-
|
|
1333
1344
|
- vendor_multimodal_api_key: str.
|
|
1334
1345
|
|
|
1335
1346
|
- vendor_multimodal_model_name: str.
|
|
1336
1347
|
|
|
1337
1348
|
- webhook_url: str.
|
|
1338
1349
|
|
|
1339
|
-
-
|
|
1350
|
+
- parse_mode: typing.Optional[ParsingMode].
|
|
1340
1351
|
|
|
1341
|
-
-
|
|
1352
|
+
- system_prompt: str.
|
|
1342
1353
|
|
|
1343
|
-
-
|
|
1354
|
+
- system_prompt_append: str.
|
|
1355
|
+
|
|
1356
|
+
- user_prompt: str.
|
|
1344
1357
|
|
|
1345
1358
|
- job_timeout_in_seconds: float.
|
|
1346
1359
|
|
|
@@ -1357,6 +1370,30 @@ class AsyncParsingClient:
|
|
|
1357
1370
|
- ignore_document_elements_for_layout_detection: bool.
|
|
1358
1371
|
|
|
1359
1372
|
- output_tables_as_html: bool.
|
|
1373
|
+
|
|
1374
|
+
- use_vendor_multimodal_model: bool.
|
|
1375
|
+
|
|
1376
|
+
- bounding_box: str.
|
|
1377
|
+
|
|
1378
|
+
- gpt_4_o_mode: bool.
|
|
1379
|
+
|
|
1380
|
+
- gpt_4_o_api_key: str.
|
|
1381
|
+
|
|
1382
|
+
- complemental_formatting_instruction: str.
|
|
1383
|
+
|
|
1384
|
+
- content_guideline_instruction: str.
|
|
1385
|
+
|
|
1386
|
+
- premium_mode: bool.
|
|
1387
|
+
|
|
1388
|
+
- is_formatting_instruction: bool.
|
|
1389
|
+
|
|
1390
|
+
- continuous_mode: bool.
|
|
1391
|
+
|
|
1392
|
+
- parsing_instruction: str.
|
|
1393
|
+
|
|
1394
|
+
- fast_mode: bool.
|
|
1395
|
+
|
|
1396
|
+
- formatting_instruction: str.
|
|
1360
1397
|
"""
|
|
1361
1398
|
_request: typing.Dict[str, typing.Any] = {
|
|
1362
1399
|
"annotate_links": annotate_links,
|
|
@@ -1373,17 +1410,12 @@ class AsyncParsingClient:
|
|
|
1373
1410
|
"bbox_left": bbox_left,
|
|
1374
1411
|
"bbox_right": bbox_right,
|
|
1375
1412
|
"bbox_top": bbox_top,
|
|
1376
|
-
"complemental_formatting_instruction": complemental_formatting_instruction,
|
|
1377
|
-
"content_guideline_instruction": content_guideline_instruction,
|
|
1378
|
-
"continuous_mode": continuous_mode,
|
|
1379
1413
|
"disable_ocr": disable_ocr,
|
|
1380
1414
|
"disable_reconstruction": disable_reconstruction,
|
|
1381
1415
|
"disable_image_extraction": disable_image_extraction,
|
|
1382
1416
|
"do_not_cache": do_not_cache,
|
|
1383
1417
|
"do_not_unroll_columns": do_not_unroll_columns,
|
|
1384
1418
|
"extract_charts": extract_charts,
|
|
1385
|
-
"fast_mode": fast_mode,
|
|
1386
|
-
"formatting_instruction": formatting_instruction,
|
|
1387
1419
|
"guess_xlsx_sheet_name": guess_xlsx_sheet_name,
|
|
1388
1420
|
"html_make_all_elements_visible": html_make_all_elements_visible,
|
|
1389
1421
|
"html_remove_fixed_elements": html_remove_fixed_elements,
|
|
@@ -1393,7 +1425,6 @@ class AsyncParsingClient:
|
|
|
1393
1425
|
"input_s3_region": input_s_3_region,
|
|
1394
1426
|
"input_url": input_url,
|
|
1395
1427
|
"invalidate_cache": invalidate_cache,
|
|
1396
|
-
"is_formatting_instruction": is_formatting_instruction,
|
|
1397
1428
|
"language": language,
|
|
1398
1429
|
"extract_layout": extract_layout,
|
|
1399
1430
|
"output_pdf_of_document": output_pdf_of_document,
|
|
@@ -1402,8 +1433,7 @@ class AsyncParsingClient:
|
|
|
1402
1433
|
"page_prefix": page_prefix,
|
|
1403
1434
|
"page_separator": page_separator,
|
|
1404
1435
|
"page_suffix": page_suffix,
|
|
1405
|
-
"
|
|
1406
|
-
"premium_mode": premium_mode,
|
|
1436
|
+
"preserve_layout_alignment_across_pages": preserve_layout_alignment_across_pages,
|
|
1407
1437
|
"skip_diagonal_text": skip_diagonal_text,
|
|
1408
1438
|
"spreadsheet_extract_sub_tables": spreadsheet_extract_sub_tables,
|
|
1409
1439
|
"structured_output": structured_output,
|
|
@@ -1411,13 +1441,12 @@ class AsyncParsingClient:
|
|
|
1411
1441
|
"structured_output_json_schema_name": structured_output_json_schema_name,
|
|
1412
1442
|
"take_screenshot": take_screenshot,
|
|
1413
1443
|
"target_pages": target_pages,
|
|
1414
|
-
"use_vendor_multimodal_model": use_vendor_multimodal_model,
|
|
1415
1444
|
"vendor_multimodal_api_key": vendor_multimodal_api_key,
|
|
1416
1445
|
"vendor_multimodal_model_name": vendor_multimodal_model_name,
|
|
1417
1446
|
"webhook_url": webhook_url,
|
|
1418
|
-
"
|
|
1419
|
-
"
|
|
1420
|
-
"
|
|
1447
|
+
"system_prompt": system_prompt,
|
|
1448
|
+
"system_prompt_append": system_prompt_append,
|
|
1449
|
+
"user_prompt": user_prompt,
|
|
1421
1450
|
"job_timeout_in_seconds": job_timeout_in_seconds,
|
|
1422
1451
|
"job_timeout_extra_time_per_page_in_seconds": job_timeout_extra_time_per_page_in_seconds,
|
|
1423
1452
|
"strict_mode_image_extraction": strict_mode_image_extraction,
|
|
@@ -1426,11 +1455,25 @@ class AsyncParsingClient:
|
|
|
1426
1455
|
"strict_mode_buggy_font": strict_mode_buggy_font,
|
|
1427
1456
|
"ignore_document_elements_for_layout_detection": ignore_document_elements_for_layout_detection,
|
|
1428
1457
|
"output_tables_as_HTML": output_tables_as_html,
|
|
1458
|
+
"use_vendor_multimodal_model": use_vendor_multimodal_model,
|
|
1459
|
+
"bounding_box": bounding_box,
|
|
1460
|
+
"gpt4o_mode": gpt_4_o_mode,
|
|
1461
|
+
"gpt4o_api_key": gpt_4_o_api_key,
|
|
1462
|
+
"complemental_formatting_instruction": complemental_formatting_instruction,
|
|
1463
|
+
"content_guideline_instruction": content_guideline_instruction,
|
|
1464
|
+
"premium_mode": premium_mode,
|
|
1465
|
+
"is_formatting_instruction": is_formatting_instruction,
|
|
1466
|
+
"continuous_mode": continuous_mode,
|
|
1467
|
+
"parsing_instruction": parsing_instruction,
|
|
1468
|
+
"fast_mode": fast_mode,
|
|
1469
|
+
"formatting_instruction": formatting_instruction,
|
|
1429
1470
|
}
|
|
1430
1471
|
if file is not OMIT:
|
|
1431
1472
|
_request["file"] = file
|
|
1432
1473
|
if max_pages is not OMIT:
|
|
1433
1474
|
_request["max_pages"] = max_pages
|
|
1475
|
+
if parse_mode is not OMIT:
|
|
1476
|
+
_request["parse_mode"] = parse_mode
|
|
1434
1477
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1435
1478
|
"POST",
|
|
1436
1479
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/upload"),
|
llama_cloud/types/__init__.py
CHANGED
|
@@ -19,7 +19,6 @@ from .app_schema_chat_chat_message import AppSchemaChatChatMessage
|
|
|
19
19
|
from .auto_transform_config import AutoTransformConfig
|
|
20
20
|
from .azure_open_ai_embedding import AzureOpenAiEmbedding
|
|
21
21
|
from .azure_open_ai_embedding_config import AzureOpenAiEmbeddingConfig
|
|
22
|
-
from .base import Base
|
|
23
22
|
from .base_prompt_template import BasePromptTemplate
|
|
24
23
|
from .bedrock_embedding import BedrockEmbedding
|
|
25
24
|
from .bedrock_embedding_config import BedrockEmbeddingConfig
|
|
@@ -200,6 +199,7 @@ from .parsing_job_json_result import ParsingJobJsonResult
|
|
|
200
199
|
from .parsing_job_markdown_result import ParsingJobMarkdownResult
|
|
201
200
|
from .parsing_job_structured_result import ParsingJobStructuredResult
|
|
202
201
|
from .parsing_job_text_result import ParsingJobTextResult
|
|
202
|
+
from .parsing_mode import ParsingMode
|
|
203
203
|
from .parsing_usage import ParsingUsage
|
|
204
204
|
from .partition_names import PartitionNames
|
|
205
205
|
from .permission import Permission
|
|
@@ -332,7 +332,6 @@ __all__ = [
|
|
|
332
332
|
"AutoTransformConfig",
|
|
333
333
|
"AzureOpenAiEmbedding",
|
|
334
334
|
"AzureOpenAiEmbeddingConfig",
|
|
335
|
-
"Base",
|
|
336
335
|
"BasePromptTemplate",
|
|
337
336
|
"BedrockEmbedding",
|
|
338
337
|
"BedrockEmbeddingConfig",
|
|
@@ -507,6 +506,7 @@ __all__ = [
|
|
|
507
506
|
"ParsingJobMarkdownResult",
|
|
508
507
|
"ParsingJobStructuredResult",
|
|
509
508
|
"ParsingJobTextResult",
|
|
509
|
+
"ParsingMode",
|
|
510
510
|
"ParsingUsage",
|
|
511
511
|
"PartitionNames",
|
|
512
512
|
"Permission",
|
|
@@ -6,7 +6,6 @@ import typing
|
|
|
6
6
|
import typing_extensions
|
|
7
7
|
|
|
8
8
|
from ..core.datetime_utils import serialize_datetime
|
|
9
|
-
from .base import Base
|
|
10
9
|
from .eval_dataset_job_params import EvalDatasetJobParams
|
|
11
10
|
from .status_enum import StatusEnum
|
|
12
11
|
|
|
@@ -43,7 +42,7 @@ class EvalDatasetJobRecord(pydantic.BaseModel):
|
|
|
43
42
|
started_at: typing.Optional[dt.datetime]
|
|
44
43
|
ended_at: typing.Optional[dt.datetime]
|
|
45
44
|
updated_at: typing.Optional[dt.datetime] = pydantic.Field(description="Update datetime")
|
|
46
|
-
data: typing.Optional[
|
|
45
|
+
data: typing.Optional[typing.Any]
|
|
47
46
|
|
|
48
47
|
def json(self, **kwargs: typing.Any) -> str:
|
|
49
48
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
llama_cloud/types/job_record.py
CHANGED
|
@@ -4,7 +4,6 @@ import datetime as dt
|
|
|
4
4
|
import typing
|
|
5
5
|
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from .base import Base
|
|
8
7
|
from .job_names import JobNames
|
|
9
8
|
from .status_enum import StatusEnum
|
|
10
9
|
|
|
@@ -26,7 +25,7 @@ class JobRecord(pydantic.BaseModel):
|
|
|
26
25
|
partitions: typing.Dict[str, str] = pydantic.Field(
|
|
27
26
|
description="The partitions for this execution. Used for determining where to save job output."
|
|
28
27
|
)
|
|
29
|
-
parameters: typing.Optional[
|
|
28
|
+
parameters: typing.Optional[typing.Any]
|
|
30
29
|
session_id: typing.Optional[str]
|
|
31
30
|
correlation_id: typing.Optional[str]
|
|
32
31
|
parent_job_execution_id: typing.Optional[str]
|
|
@@ -41,7 +40,7 @@ class JobRecord(pydantic.BaseModel):
|
|
|
41
40
|
started_at: typing.Optional[dt.datetime]
|
|
42
41
|
ended_at: typing.Optional[dt.datetime]
|
|
43
42
|
updated_at: typing.Optional[dt.datetime] = pydantic.Field(description="Update datetime")
|
|
44
|
-
data: typing.Optional[
|
|
43
|
+
data: typing.Optional[typing.Any]
|
|
45
44
|
|
|
46
45
|
def json(self, **kwargs: typing.Any) -> str:
|
|
47
46
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -5,6 +5,7 @@ import typing
|
|
|
5
5
|
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
|
7
7
|
from .parser_languages import ParserLanguages
|
|
8
|
+
from .parsing_mode import ParsingMode
|
|
8
9
|
|
|
9
10
|
try:
|
|
10
11
|
import pydantic
|
|
@@ -31,6 +32,7 @@ class LlamaParseParameters(pydantic.BaseModel):
|
|
|
31
32
|
do_not_cache: typing.Optional[bool]
|
|
32
33
|
fast_mode: typing.Optional[bool]
|
|
33
34
|
skip_diagonal_text: typing.Optional[bool]
|
|
35
|
+
preserve_layout_alignment_across_pages: typing.Optional[bool]
|
|
34
36
|
gpt_4_o_mode: typing.Optional[bool] = pydantic.Field(alias="gpt4o_mode")
|
|
35
37
|
gpt_4_o_api_key: typing.Optional[str] = pydantic.Field(alias="gpt4o_api_key")
|
|
36
38
|
do_not_unroll_columns: typing.Optional[bool]
|
|
@@ -91,6 +93,10 @@ class LlamaParseParameters(pydantic.BaseModel):
|
|
|
91
93
|
ignore_document_elements_for_layout_detection: typing.Optional[bool]
|
|
92
94
|
output_tables_as_html: typing.Optional[bool] = pydantic.Field(alias="output_tables_as_HTML")
|
|
93
95
|
internal_is_screenshot_job: typing.Optional[bool]
|
|
96
|
+
parse_mode: typing.Optional[ParsingMode]
|
|
97
|
+
system_prompt: typing.Optional[str]
|
|
98
|
+
system_prompt_append: typing.Optional[str]
|
|
99
|
+
user_prompt: typing.Optional[str]
|
|
94
100
|
|
|
95
101
|
def json(self, **kwargs: typing.Any) -> str:
|
|
96
102
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -22,6 +22,7 @@ class LlmParameters(pydantic.BaseModel):
|
|
|
22
22
|
system_prompt: typing.Optional[str]
|
|
23
23
|
temperature: typing.Optional[float]
|
|
24
24
|
use_chain_of_thought_reasoning: typing.Optional[bool]
|
|
25
|
+
use_citation: typing.Optional[bool]
|
|
25
26
|
class_name: typing.Optional[str]
|
|
26
27
|
|
|
27
28
|
def json(self, **kwargs: typing.Any) -> str:
|
|
@@ -18,6 +18,7 @@ class PageScreenshotMetadata(pydantic.BaseModel):
|
|
|
18
18
|
page_index: int = pydantic.Field(description="The index of the page for which the screenshot is taken (0-indexed)")
|
|
19
19
|
file_id: str = pydantic.Field(description="The ID of the file that the page screenshot was taken from")
|
|
20
20
|
image_size: int = pydantic.Field(description="The size of the image in bytes")
|
|
21
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]]
|
|
21
22
|
|
|
22
23
|
def json(self, **kwargs: typing.Any) -> str:
|
|
23
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import enum
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
T_Result = typing.TypeVar("T_Result")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ParsingMode(str, enum.Enum):
|
|
10
|
+
"""
|
|
11
|
+
Enum for representing the mode of parsing to be used
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
PARSE_PAGE_WITHOUT_LLM = "parse_page_without_llm"
|
|
15
|
+
PARSE_PAGE_WITH_LLM = "parse_page_with_llm"
|
|
16
|
+
PARSE_PAGE_WITH_LVM = "parse_page_with_lvm"
|
|
17
|
+
PARSE_PAGE_WITH_AGENT = "parse_page_with_agent"
|
|
18
|
+
PARSE_DOCUMENT_WITH_LLM = "parse_document_with_llm"
|
|
19
|
+
|
|
20
|
+
def visit(
|
|
21
|
+
self,
|
|
22
|
+
parse_page_without_llm: typing.Callable[[], T_Result],
|
|
23
|
+
parse_page_with_llm: typing.Callable[[], T_Result],
|
|
24
|
+
parse_page_with_lvm: typing.Callable[[], T_Result],
|
|
25
|
+
parse_page_with_agent: typing.Callable[[], T_Result],
|
|
26
|
+
parse_document_with_llm: typing.Callable[[], T_Result],
|
|
27
|
+
) -> T_Result:
|
|
28
|
+
if self is ParsingMode.PARSE_PAGE_WITHOUT_LLM:
|
|
29
|
+
return parse_page_without_llm()
|
|
30
|
+
if self is ParsingMode.PARSE_PAGE_WITH_LLM:
|
|
31
|
+
return parse_page_with_llm()
|
|
32
|
+
if self is ParsingMode.PARSE_PAGE_WITH_LVM:
|
|
33
|
+
return parse_page_with_lvm()
|
|
34
|
+
if self is ParsingMode.PARSE_PAGE_WITH_AGENT:
|
|
35
|
+
return parse_page_with_agent()
|
|
36
|
+
if self is ParsingMode.PARSE_DOCUMENT_WITH_LLM:
|
|
37
|
+
return parse_document_with_llm()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: llama-cloud
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Logan Markewich
|
|
@@ -12,7 +12,6 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.9
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
15
|
Requires-Dist: certifi (>=2024.7.4)
|
|
17
16
|
Requires-Dist: httpx (>=0.20.0)
|
|
18
17
|
Requires-Dist: pydantic (>=1.10)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
llama_cloud/__init__.py,sha256=
|
|
1
|
+
llama_cloud/__init__.py,sha256=Gj7v4ih6fClpdnFDcbyebawJILfPIlnr4PrS2JhhEWA,22197
|
|
2
2
|
llama_cloud/client.py,sha256=0fK6iRBCA77eSs0zFrYQj-zD0BLy6Dr2Ss0ETJ4WaOY,5555
|
|
3
3
|
llama_cloud/core/__init__.py,sha256=QJS3CJ2TYP2E1Tge0CS6Z7r8LTNzJHQVX1hD3558eP0,519
|
|
4
4
|
llama_cloud/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
@@ -38,7 +38,7 @@ llama_cloud/resources/files/types/file_create_resource_info_value.py,sha256=R7Y-
|
|
|
38
38
|
llama_cloud/resources/jobs/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
39
39
|
llama_cloud/resources/jobs/client.py,sha256=mN9uOzys9aZkhOJkApUy0yhfNeK8X09xQxT34ZPptNY,5386
|
|
40
40
|
llama_cloud/resources/llama_extract/__init__.py,sha256=MgOA61chV7LogriUoyswOT627LaVt3UIb-imM3BvHdQ,617
|
|
41
|
-
llama_cloud/resources/llama_extract/client.py,sha256=
|
|
41
|
+
llama_cloud/resources/llama_extract/client.py,sha256=SLUG01nPtdLhAXn0nMYUqkYSVrRtPQgq155fPn82KiM,55654
|
|
42
42
|
llama_cloud/resources/llama_extract/types/__init__.py,sha256=yY34YD-MI4SnSbyJY5JwCGBBfqRr0dNh2zibRUt8mt4,895
|
|
43
43
|
llama_cloud/resources/llama_extract/types/extract_agent_create_data_schema.py,sha256=zB31hJQ8hKaIsPkfTWiX5hqsPVFMyyeWEDZ_Aq237jo,305
|
|
44
44
|
llama_cloud/resources/llama_extract/types/extract_agent_create_data_schema_zero_value.py,sha256=xoyXH3f0Y5beMWBxmtXSz6QoB_df_-0QBsYdjBhZnGw,217
|
|
@@ -49,7 +49,7 @@ llama_cloud/resources/llama_extract/types/extract_schema_validate_request_data_s
|
|
|
49
49
|
llama_cloud/resources/organizations/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
50
50
|
llama_cloud/resources/organizations/client.py,sha256=VRqPsWYEksvysYgKIOGnfhXjC3aaf9OHK6fHsS-XHqk,55460
|
|
51
51
|
llama_cloud/resources/parsing/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
52
|
-
llama_cloud/resources/parsing/client.py,sha256=
|
|
52
|
+
llama_cloud/resources/parsing/client.py,sha256=wOGNhHFrdqkJ8xSOhUFnlmS2ZahDeKP1kUWSo9WCHbY,73610
|
|
53
53
|
llama_cloud/resources/pipelines/__init__.py,sha256=Mx7p3jDZRLMltsfywSufam_4AnHvmAfsxtMHVI72e-8,1083
|
|
54
54
|
llama_cloud/resources/pipelines/client.py,sha256=MORoQkrH6-8-utV41zrXjFW2BegDsa_6pJhJvFH4OMQ,134251
|
|
55
55
|
llama_cloud/resources/pipelines/types/__init__.py,sha256=jjaMc0V3K1HZLMYZ6WT4ydMtBCVy-oF5koqTCovbDws,1202
|
|
@@ -64,7 +64,7 @@ llama_cloud/resources/reports/types/__init__.py,sha256=LfwDYrI4RcQu-o42iAe7HkcwH
|
|
|
64
64
|
llama_cloud/resources/reports/types/update_report_plan_api_v_1_reports_report_id_plan_patch_request_action.py,sha256=Qh-MSeRvDBfNb5hoLELivv1pLtrYVf52WVoP7G8V34A,807
|
|
65
65
|
llama_cloud/resources/retrievers/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
66
66
|
llama_cloud/resources/retrievers/client.py,sha256=ASDdqnwXX4qj0sCAkWO7RKFnQ1oiLzBLIQ2bwqnMOKs,24905
|
|
67
|
-
llama_cloud/types/__init__.py,sha256=
|
|
67
|
+
llama_cloud/types/__init__.py,sha256=34m42Eg8gOU0pfNnnjeEapXKArCpibp7Typwd70sRXI,26365
|
|
68
68
|
llama_cloud/types/advanced_mode_transform_config.py,sha256=4xCXye0_cPmVS1F8aNTx81sIaEPjQH9kiCCAIoqUzlI,1502
|
|
69
69
|
llama_cloud/types/advanced_mode_transform_config_chunking_config.py,sha256=wYbJnWLpeQDfhmDZz-wJfYzD1iGT5Jcxb9ga3mzUuvk,1983
|
|
70
70
|
llama_cloud/types/advanced_mode_transform_config_segmentation_config.py,sha256=anNGq0F5-IlbIW3kpC8OilzLJnUq5tdIcWHnRnmlYsg,1303
|
|
@@ -72,7 +72,6 @@ llama_cloud/types/app_schema_chat_chat_message.py,sha256=4Mplkc7PczuxKL7Gga3aj8Q
|
|
|
72
72
|
llama_cloud/types/auto_transform_config.py,sha256=HVeHZM75DMRznScqLTfrMwcZwIdyWPuaEYbPewnHqwc,1168
|
|
73
73
|
llama_cloud/types/azure_open_ai_embedding.py,sha256=MeDqZoPYFN7Nv_imY9cfqDU9SPlEyAY4HcQZ4PF5X3g,2264
|
|
74
74
|
llama_cloud/types/azure_open_ai_embedding_config.py,sha256=o1zZhzcGElH3SeixFErrm7P_WFHQ6LvrLem_nKJWunw,1170
|
|
75
|
-
llama_cloud/types/base.py,sha256=cn_Zn61yLMDCMm1iZTPvKILSRlqRzOqZtSYyYBY5dIE,938
|
|
76
75
|
llama_cloud/types/base_prompt_template.py,sha256=Cw3887tnytHZ5bJBSlniyU9k5ASidv9VYR86--IbNqo,1248
|
|
77
76
|
llama_cloud/types/bedrock_embedding.py,sha256=qrUoVW9Q2DLg-3nBRfGsZqUWGszfzc6ZHR8LJiXTZk4,1908
|
|
78
77
|
llama_cloud/types/bedrock_embedding_config.py,sha256=32dMhoA2cLx1jeogDnCl9WPVb83Hn99nAALnt5BM208,1147
|
|
@@ -135,7 +134,7 @@ llama_cloud/types/embedding_model_config_update.py,sha256=BiA1KbFT-TSvy5OEyChd0d
|
|
|
135
134
|
llama_cloud/types/embedding_model_config_update_embedding_config.py,sha256=mrXFxzb9GRaH4UUnOe_05-uYUuiTgDDCRadAMbPmGgc,2991
|
|
136
135
|
llama_cloud/types/eval_dataset.py,sha256=FIP4uHqUXg0LxGPaq-LmW2aTcEdQk-i5AYLbGqsQSV0,1310
|
|
137
136
|
llama_cloud/types/eval_dataset_job_params.py,sha256=vcXLJWO581uigNvGAurPDgMeEFtQURWucLF5pemdeS0,1343
|
|
138
|
-
llama_cloud/types/eval_dataset_job_record.py,sha256=
|
|
137
|
+
llama_cloud/types/eval_dataset_job_record.py,sha256=vBDz7xezpE8AB6Kw7sZLYxgMcv0dxUWVC01_fI2QuUU,2168
|
|
139
138
|
llama_cloud/types/eval_execution_params.py,sha256=ntVaJh5SMZMPL4QLUiihVjUlg2SKbrezvbMKGlrF66Q,1369
|
|
140
139
|
llama_cloud/types/eval_execution_params_override.py,sha256=ihEFbMRYmFJ5mWmFW24JjV6D0qqeDM4p829mSxMGtOQ,1195
|
|
141
140
|
llama_cloud/types/eval_metric.py,sha256=vhO_teMLiyzBdzKpOBW8Bm9qCw2h6m3unp2XotB7pDQ,499
|
|
@@ -182,16 +181,16 @@ llama_cloud/types/input_message.py,sha256=Ym6-tX6CMWKuHfxRtyM2y16kqSS3BzHged9rFR
|
|
|
182
181
|
llama_cloud/types/interval_usage_and_plan.py,sha256=qRZs0MsbJ_X53YfgNujKnJjRYhMn2Bn6bjBUKKUZnZc,1161
|
|
183
182
|
llama_cloud/types/job_name_mapping.py,sha256=2dQFQlVHoeSlkyEKSEJv0M3PzJf7hMvkuABj3vMY7ys,1617
|
|
184
183
|
llama_cloud/types/job_names.py,sha256=ZapQT__pLI14SagjGi8AsEwWY949hBoplQemMgb_Aoc,4098
|
|
185
|
-
llama_cloud/types/job_record.py,sha256
|
|
184
|
+
llama_cloud/types/job_record.py,sha256=r2WzLQXSOFogNMN2rl10rAlYI9OTCmVn06QaZXxa0rQ,2058
|
|
186
185
|
llama_cloud/types/job_record_with_usage_metrics.py,sha256=iNV2do5TB_0e3PoOz_DJyAaM6Cn9G8KG-dGPGgEs5SY,1198
|
|
187
186
|
llama_cloud/types/llama_extract_settings.py,sha256=Yh9Ah9W0X4l-znjYm4oNIh8-LCBc99JEQmGU87bUzWs,2225
|
|
188
187
|
llama_cloud/types/llama_index_core_base_llms_types_chat_message.py,sha256=NelHo-T-ebVMhRKsqE_xV8AJW4c7o6lS0uEQnPsmTwg,1365
|
|
189
188
|
llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py,sha256=tTglUqrSUaVc2Wsi4uIt5MU-80_oxZzTnhf8ziilVGY,874
|
|
190
|
-
llama_cloud/types/llama_parse_parameters.py,sha256=
|
|
189
|
+
llama_cloud/types/llama_parse_parameters.py,sha256=EQsbxUsMOpmG3RgkZ151dPlwuI7puKw1CA4YIknst4U,5155
|
|
191
190
|
llama_cloud/types/llama_parse_supported_file_extensions.py,sha256=B_0N3f8Aq59W9FbsH50mGBUiyWTIXQjHFl739uAyaQw,11207
|
|
192
191
|
llama_cloud/types/llm.py,sha256=7iIItVPjURp4u5xxJDAFIefUdhUKwIuA245WXilJPXE,2234
|
|
193
192
|
llama_cloud/types/llm_model_data.py,sha256=6rrycqGwlK3LZ2S-WtgmeomithdLhDCgwBBZQ5KLaso,1300
|
|
194
|
-
llama_cloud/types/llm_parameters.py,sha256=
|
|
193
|
+
llama_cloud/types/llm_parameters.py,sha256=RTKYt09lm9a1MlnBfYuTP2x_Ww4byUNNc1TqIel5O1Y,1377
|
|
195
194
|
llama_cloud/types/local_eval.py,sha256=aJ8jRG0b5EL9cLjx281bzAzPw7Ar004Jfp6mBmyjuTA,1491
|
|
196
195
|
llama_cloud/types/local_eval_results.py,sha256=YfK6AhfD0gr5apQBfrfzrTHDXvrk7ynAUUjNSKu9NVk,1380
|
|
197
196
|
llama_cloud/types/local_eval_sets.py,sha256=XJSSriwRvkma889pPiBQrpRakKejKOX3tWPu1TGb1ug,1181
|
|
@@ -216,7 +215,7 @@ llama_cloud/types/open_ai_embedding_config.py,sha256=Mquc0JrtCo8lVYA2WW7q0ZikS3H
|
|
|
216
215
|
llama_cloud/types/organization.py,sha256=p8mYRqSsGxw17AmdW8x8nP7P1UbdpYkwr51WTIjTVLw,1467
|
|
217
216
|
llama_cloud/types/organization_create.py,sha256=hUXRwArIx_0D_lilpL7z-B0oJJ5yEX8Sbu2xqfH_9so,1086
|
|
218
217
|
llama_cloud/types/page_figure_metadata.py,sha256=iIg6_f2SwJg6UcQo9X4MoSm_ygxnIBmFjS2LuUsI6qE,1528
|
|
219
|
-
llama_cloud/types/page_screenshot_metadata.py,sha256=
|
|
218
|
+
llama_cloud/types/page_screenshot_metadata.py,sha256=lobrq0AsOr8sDwMgA9ytop8lRmRFvJW2oiql3yLvbjM,1328
|
|
220
219
|
llama_cloud/types/page_screenshot_node_with_score.py,sha256=EdqoXbmARCz1DV14E2saCPshIeII709uM4cLwxw_mkM,1232
|
|
221
220
|
llama_cloud/types/page_segmentation_config.py,sha256=VH8uuxnubnJak1gSpS64OoMueHidhsDB-2eq2tVHbag,998
|
|
222
221
|
llama_cloud/types/page_splitter_node_parser.py,sha256=rQgS1CDk18UKA0r9OPvjdtM570jzFArdLCTxYAtZny8,1424
|
|
@@ -231,6 +230,7 @@ llama_cloud/types/parsing_job_json_result.py,sha256=BA3_u-ChHpE5wm08WmOvgPUsMsCl
|
|
|
231
230
|
llama_cloud/types/parsing_job_markdown_result.py,sha256=gPIUO0JwtKwvSHcRYEr995DNl7VN3EaaSaj4aPHCP4o,1077
|
|
232
231
|
llama_cloud/types/parsing_job_structured_result.py,sha256=w_Z4DOHjwUPmffjc4qJiGYbniWTpkjpVcD4irL1dDj0,1017
|
|
233
232
|
llama_cloud/types/parsing_job_text_result.py,sha256=TP-7IRTWZLAZz7NYLkzi4PsGnaRJuPTt40p56Mk6Rhw,1065
|
|
233
|
+
llama_cloud/types/parsing_mode.py,sha256=ppsF_Mia1FF26Zk3sZBwERxuqMbhvVDuVoR2kOsKJdE,1340
|
|
234
234
|
llama_cloud/types/parsing_usage.py,sha256=JLlozu-vIkcRKqWaOVJ9Z2TrY7peJRTzOpYjOThGKGQ,1012
|
|
235
235
|
llama_cloud/types/partition_names.py,sha256=zZZn-sn59gwch2fa7fGMwFWUEuu5Dfen3ZqKtcPnBEM,1877
|
|
236
236
|
llama_cloud/types/permission.py,sha256=LjhZdo0oLvk7ZVIF1d6Qja--AKH5Ri0naUhuJvZS6Ng,1345
|
|
@@ -319,7 +319,7 @@ llama_cloud/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPX
|
|
|
319
319
|
llama_cloud/types/vertex_ai_embedding_config.py,sha256=DvQk2xMJFmo54MEXTzoM4KSADyhGm_ygmFyx6wIcQdw,1159
|
|
320
320
|
llama_cloud/types/vertex_embedding_mode.py,sha256=yY23FjuWU_DkXjBb3JoKV4SCMqel2BaIMltDqGnIowU,1217
|
|
321
321
|
llama_cloud/types/vertex_text_embedding.py,sha256=-C4fNCYfFl36ATdBMGFVPpiHIKxjk0KB1ERA2Ec20aU,1932
|
|
322
|
-
llama_cloud-0.1.
|
|
323
|
-
llama_cloud-0.1.
|
|
324
|
-
llama_cloud-0.1.
|
|
325
|
-
llama_cloud-0.1.
|
|
322
|
+
llama_cloud-0.1.13.dist-info/LICENSE,sha256=_iNqtPcw1Ue7dZKwOwgPtbegMUkWVy15hC7bffAdNmY,1067
|
|
323
|
+
llama_cloud-0.1.13.dist-info/METADATA,sha256=z7rMCV38oE2gVWpA1bfFemHvMaNa-JuQp8U_f3FYRVo,800
|
|
324
|
+
llama_cloud-0.1.13.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
325
|
+
llama_cloud-0.1.13.dist-info/RECORD,,
|
llama_cloud/types/base.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import datetime as dt
|
|
4
|
-
import typing
|
|
5
|
-
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
|
|
8
|
-
try:
|
|
9
|
-
import pydantic
|
|
10
|
-
if pydantic.__version__.startswith("1."):
|
|
11
|
-
raise ImportError
|
|
12
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
13
|
-
except ImportError:
|
|
14
|
-
import pydantic # type: ignore
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class Base(pydantic.BaseModel):
|
|
18
|
-
def json(self, **kwargs: typing.Any) -> str:
|
|
19
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
20
|
-
return super().json(**kwargs_with_defaults)
|
|
21
|
-
|
|
22
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
23
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
|
-
return super().dict(**kwargs_with_defaults)
|
|
25
|
-
|
|
26
|
-
class Config:
|
|
27
|
-
frozen = True
|
|
28
|
-
smart_union = True
|
|
29
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
File without changes
|