llama-cloud 0.1.40__py3-none-any.whl → 0.1.42__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 +18 -72
- llama_cloud/client.py +2 -5
- llama_cloud/resources/__init__.py +0 -4
- llama_cloud/resources/alpha/client.py +14 -30
- llama_cloud/resources/beta/client.py +1791 -344
- llama_cloud/resources/llama_extract/client.py +48 -0
- llama_cloud/resources/organizations/client.py +18 -4
- llama_cloud/resources/parsing/client.py +56 -0
- llama_cloud/resources/pipelines/client.py +164 -0
- llama_cloud/types/__init__.py +18 -72
- llama_cloud/types/agent_data.py +1 -1
- llama_cloud/types/agent_deployment_summary.py +1 -2
- llama_cloud/types/{report_create_response.py → api_key.py} +14 -2
- llama_cloud/types/{edit_suggestion.py → api_key_query_response.py} +6 -6
- llama_cloud/types/api_key_type.py +17 -0
- llama_cloud/types/{src_app_schema_chat_chat_message.py → chat_message.py} +1 -1
- llama_cloud/types/extract_config.py +8 -2
- llama_cloud/types/extract_models.py +28 -28
- llama_cloud/types/legacy_parse_job_config.py +3 -0
- llama_cloud/types/llama_extract_mode_availability.py +4 -3
- llama_cloud/types/llama_extract_settings.py +1 -1
- llama_cloud/types/llama_parse_parameters.py +7 -0
- llama_cloud/types/organization.py +1 -0
- llama_cloud/types/{progress_event.py → parse_configuration.py} +12 -12
- llama_cloud/types/{llama_index_core_base_llms_types_chat_message.py → parse_configuration_create.py} +9 -7
- llama_cloud/types/{report_update_event.py → parse_configuration_filter.py} +8 -6
- llama_cloud/types/{report_state_event.py → parse_configuration_query_response.py} +6 -6
- llama_cloud/types/parse_job_config.py +7 -0
- llama_cloud/types/pipeline_create.py +1 -1
- llama_cloud/types/playground_session.py +2 -2
- llama_cloud/types/public_model_name.py +97 -0
- llama_cloud/types/quota_configuration_configuration_type.py +4 -0
- {llama_cloud-0.1.40.dist-info → llama_cloud-0.1.42.dist-info}/METADATA +1 -1
- {llama_cloud-0.1.40.dist-info → llama_cloud-0.1.42.dist-info}/RECORD +36 -58
- {llama_cloud-0.1.40.dist-info → llama_cloud-0.1.42.dist-info}/WHEEL +1 -1
- llama_cloud/resources/reports/__init__.py +0 -5
- llama_cloud/resources/reports/client.py +0 -1230
- llama_cloud/resources/reports/types/__init__.py +0 -7
- llama_cloud/resources/reports/types/update_report_plan_api_v_1_reports_report_id_plan_patch_request_action.py +0 -25
- llama_cloud/types/audio_block.py +0 -34
- llama_cloud/types/document_block.py +0 -35
- llama_cloud/types/edit_suggestion_blocks_item.py +0 -8
- llama_cloud/types/image_block.py +0 -35
- llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +0 -56
- llama_cloud/types/paginated_report_response.py +0 -35
- llama_cloud/types/progress_event_status.py +0 -33
- llama_cloud/types/report.py +0 -33
- llama_cloud/types/report_block.py +0 -35
- llama_cloud/types/report_block_dependency.py +0 -29
- llama_cloud/types/report_event_item.py +0 -40
- llama_cloud/types/report_event_item_event_data.py +0 -45
- llama_cloud/types/report_event_type.py +0 -37
- llama_cloud/types/report_metadata.py +0 -43
- llama_cloud/types/report_plan.py +0 -36
- llama_cloud/types/report_plan_block.py +0 -36
- llama_cloud/types/report_query.py +0 -33
- llama_cloud/types/report_response.py +0 -41
- llama_cloud/types/report_state.py +0 -37
- llama_cloud/types/text_block.py +0 -31
- {llama_cloud-0.1.40.dist-info → llama_cloud-0.1.42.dist-info}/LICENSE +0 -0
|
@@ -111,7 +111,9 @@ class LlamaExtractClient:
|
|
|
111
111
|
ExtractConfig,
|
|
112
112
|
ExtractConfigPriority,
|
|
113
113
|
ExtractMode,
|
|
114
|
+
ExtractModels,
|
|
114
115
|
ExtractTarget,
|
|
116
|
+
PublicModelName,
|
|
115
117
|
)
|
|
116
118
|
from llama_cloud.client import LlamaCloud
|
|
117
119
|
|
|
@@ -124,6 +126,8 @@ class LlamaExtractClient:
|
|
|
124
126
|
priority=ExtractConfigPriority.LOW,
|
|
125
127
|
extraction_target=ExtractTarget.PER_DOC,
|
|
126
128
|
extraction_mode=ExtractMode.FAST,
|
|
129
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
130
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
127
131
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
128
132
|
),
|
|
129
133
|
)
|
|
@@ -359,7 +363,9 @@ class LlamaExtractClient:
|
|
|
359
363
|
ExtractConfig,
|
|
360
364
|
ExtractConfigPriority,
|
|
361
365
|
ExtractMode,
|
|
366
|
+
ExtractModels,
|
|
362
367
|
ExtractTarget,
|
|
368
|
+
PublicModelName,
|
|
363
369
|
)
|
|
364
370
|
from llama_cloud.client import LlamaCloud
|
|
365
371
|
|
|
@@ -372,6 +378,8 @@ class LlamaExtractClient:
|
|
|
372
378
|
priority=ExtractConfigPriority.LOW,
|
|
373
379
|
extraction_target=ExtractTarget.PER_DOC,
|
|
374
380
|
extraction_mode=ExtractMode.FAST,
|
|
381
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
382
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
375
383
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
376
384
|
),
|
|
377
385
|
)
|
|
@@ -472,7 +480,9 @@ class LlamaExtractClient:
|
|
|
472
480
|
ExtractJobCreate,
|
|
473
481
|
ExtractJobCreatePriority,
|
|
474
482
|
ExtractMode,
|
|
483
|
+
ExtractModels,
|
|
475
484
|
ExtractTarget,
|
|
485
|
+
PublicModelName,
|
|
476
486
|
)
|
|
477
487
|
from llama_cloud.client import LlamaCloud
|
|
478
488
|
|
|
@@ -488,6 +498,8 @@ class LlamaExtractClient:
|
|
|
488
498
|
priority=ExtractConfigPriority.LOW,
|
|
489
499
|
extraction_target=ExtractTarget.PER_DOC,
|
|
490
500
|
extraction_mode=ExtractMode.FAST,
|
|
501
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
502
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
491
503
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
492
504
|
),
|
|
493
505
|
),
|
|
@@ -564,6 +576,7 @@ class LlamaExtractClient:
|
|
|
564
576
|
ExtractJobCreate,
|
|
565
577
|
ExtractJobCreatePriority,
|
|
566
578
|
ExtractMode,
|
|
579
|
+
ExtractModels,
|
|
567
580
|
ExtractTarget,
|
|
568
581
|
FailPageMode,
|
|
569
582
|
LlamaExtractSettings,
|
|
@@ -571,6 +584,7 @@ class LlamaExtractClient:
|
|
|
571
584
|
LlamaParseParametersPriority,
|
|
572
585
|
MultimodalParseResolution,
|
|
573
586
|
ParsingMode,
|
|
587
|
+
PublicModelName,
|
|
574
588
|
)
|
|
575
589
|
from llama_cloud.client import LlamaCloud
|
|
576
590
|
|
|
@@ -586,6 +600,8 @@ class LlamaExtractClient:
|
|
|
586
600
|
priority=ExtractConfigPriority.LOW,
|
|
587
601
|
extraction_target=ExtractTarget.PER_DOC,
|
|
588
602
|
extraction_mode=ExtractMode.FAST,
|
|
603
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
604
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
589
605
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
590
606
|
),
|
|
591
607
|
),
|
|
@@ -693,7 +709,9 @@ class LlamaExtractClient:
|
|
|
693
709
|
ExtractConfig,
|
|
694
710
|
ExtractConfigPriority,
|
|
695
711
|
ExtractMode,
|
|
712
|
+
ExtractModels,
|
|
696
713
|
ExtractTarget,
|
|
714
|
+
PublicModelName,
|
|
697
715
|
)
|
|
698
716
|
from llama_cloud.client import LlamaCloud
|
|
699
717
|
|
|
@@ -707,6 +725,8 @@ class LlamaExtractClient:
|
|
|
707
725
|
priority=ExtractConfigPriority.LOW,
|
|
708
726
|
extraction_target=ExtractTarget.PER_DOC,
|
|
709
727
|
extraction_mode=ExtractMode.FAST,
|
|
728
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
729
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
710
730
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
711
731
|
),
|
|
712
732
|
)
|
|
@@ -988,8 +1008,10 @@ class LlamaExtractClient:
|
|
|
988
1008
|
ExtractConfig,
|
|
989
1009
|
ExtractConfigPriority,
|
|
990
1010
|
ExtractMode,
|
|
1011
|
+
ExtractModels,
|
|
991
1012
|
ExtractTarget,
|
|
992
1013
|
FileData,
|
|
1014
|
+
PublicModelName,
|
|
993
1015
|
)
|
|
994
1016
|
from llama_cloud.client import LlamaCloud
|
|
995
1017
|
|
|
@@ -1001,6 +1023,8 @@ class LlamaExtractClient:
|
|
|
1001
1023
|
priority=ExtractConfigPriority.LOW,
|
|
1002
1024
|
extraction_target=ExtractTarget.PER_DOC,
|
|
1003
1025
|
extraction_mode=ExtractMode.FAST,
|
|
1026
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
1027
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
1004
1028
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
1005
1029
|
),
|
|
1006
1030
|
file=FileData(
|
|
@@ -1108,7 +1132,9 @@ class AsyncLlamaExtractClient:
|
|
|
1108
1132
|
ExtractConfig,
|
|
1109
1133
|
ExtractConfigPriority,
|
|
1110
1134
|
ExtractMode,
|
|
1135
|
+
ExtractModels,
|
|
1111
1136
|
ExtractTarget,
|
|
1137
|
+
PublicModelName,
|
|
1112
1138
|
)
|
|
1113
1139
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1114
1140
|
|
|
@@ -1121,6 +1147,8 @@ class AsyncLlamaExtractClient:
|
|
|
1121
1147
|
priority=ExtractConfigPriority.LOW,
|
|
1122
1148
|
extraction_target=ExtractTarget.PER_DOC,
|
|
1123
1149
|
extraction_mode=ExtractMode.FAST,
|
|
1150
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
1151
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
1124
1152
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
1125
1153
|
),
|
|
1126
1154
|
)
|
|
@@ -1356,7 +1384,9 @@ class AsyncLlamaExtractClient:
|
|
|
1356
1384
|
ExtractConfig,
|
|
1357
1385
|
ExtractConfigPriority,
|
|
1358
1386
|
ExtractMode,
|
|
1387
|
+
ExtractModels,
|
|
1359
1388
|
ExtractTarget,
|
|
1389
|
+
PublicModelName,
|
|
1360
1390
|
)
|
|
1361
1391
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1362
1392
|
|
|
@@ -1369,6 +1399,8 @@ class AsyncLlamaExtractClient:
|
|
|
1369
1399
|
priority=ExtractConfigPriority.LOW,
|
|
1370
1400
|
extraction_target=ExtractTarget.PER_DOC,
|
|
1371
1401
|
extraction_mode=ExtractMode.FAST,
|
|
1402
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
1403
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
1372
1404
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
1373
1405
|
),
|
|
1374
1406
|
)
|
|
@@ -1469,7 +1501,9 @@ class AsyncLlamaExtractClient:
|
|
|
1469
1501
|
ExtractJobCreate,
|
|
1470
1502
|
ExtractJobCreatePriority,
|
|
1471
1503
|
ExtractMode,
|
|
1504
|
+
ExtractModels,
|
|
1472
1505
|
ExtractTarget,
|
|
1506
|
+
PublicModelName,
|
|
1473
1507
|
)
|
|
1474
1508
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1475
1509
|
|
|
@@ -1485,6 +1519,8 @@ class AsyncLlamaExtractClient:
|
|
|
1485
1519
|
priority=ExtractConfigPriority.LOW,
|
|
1486
1520
|
extraction_target=ExtractTarget.PER_DOC,
|
|
1487
1521
|
extraction_mode=ExtractMode.FAST,
|
|
1522
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
1523
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
1488
1524
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
1489
1525
|
),
|
|
1490
1526
|
),
|
|
@@ -1561,6 +1597,7 @@ class AsyncLlamaExtractClient:
|
|
|
1561
1597
|
ExtractJobCreate,
|
|
1562
1598
|
ExtractJobCreatePriority,
|
|
1563
1599
|
ExtractMode,
|
|
1600
|
+
ExtractModels,
|
|
1564
1601
|
ExtractTarget,
|
|
1565
1602
|
FailPageMode,
|
|
1566
1603
|
LlamaExtractSettings,
|
|
@@ -1568,6 +1605,7 @@ class AsyncLlamaExtractClient:
|
|
|
1568
1605
|
LlamaParseParametersPriority,
|
|
1569
1606
|
MultimodalParseResolution,
|
|
1570
1607
|
ParsingMode,
|
|
1608
|
+
PublicModelName,
|
|
1571
1609
|
)
|
|
1572
1610
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1573
1611
|
|
|
@@ -1583,6 +1621,8 @@ class AsyncLlamaExtractClient:
|
|
|
1583
1621
|
priority=ExtractConfigPriority.LOW,
|
|
1584
1622
|
extraction_target=ExtractTarget.PER_DOC,
|
|
1585
1623
|
extraction_mode=ExtractMode.FAST,
|
|
1624
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
1625
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
1586
1626
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
1587
1627
|
),
|
|
1588
1628
|
),
|
|
@@ -1690,7 +1730,9 @@ class AsyncLlamaExtractClient:
|
|
|
1690
1730
|
ExtractConfig,
|
|
1691
1731
|
ExtractConfigPriority,
|
|
1692
1732
|
ExtractMode,
|
|
1733
|
+
ExtractModels,
|
|
1693
1734
|
ExtractTarget,
|
|
1735
|
+
PublicModelName,
|
|
1694
1736
|
)
|
|
1695
1737
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1696
1738
|
|
|
@@ -1704,6 +1746,8 @@ class AsyncLlamaExtractClient:
|
|
|
1704
1746
|
priority=ExtractConfigPriority.LOW,
|
|
1705
1747
|
extraction_target=ExtractTarget.PER_DOC,
|
|
1706
1748
|
extraction_mode=ExtractMode.FAST,
|
|
1749
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
1750
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
1707
1751
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
1708
1752
|
),
|
|
1709
1753
|
)
|
|
@@ -1985,8 +2029,10 @@ class AsyncLlamaExtractClient:
|
|
|
1985
2029
|
ExtractConfig,
|
|
1986
2030
|
ExtractConfigPriority,
|
|
1987
2031
|
ExtractMode,
|
|
2032
|
+
ExtractModels,
|
|
1988
2033
|
ExtractTarget,
|
|
1989
2034
|
FileData,
|
|
2035
|
+
PublicModelName,
|
|
1990
2036
|
)
|
|
1991
2037
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1992
2038
|
|
|
@@ -1998,6 +2044,8 @@ class AsyncLlamaExtractClient:
|
|
|
1998
2044
|
priority=ExtractConfigPriority.LOW,
|
|
1999
2045
|
extraction_target=ExtractTarget.PER_DOC,
|
|
2000
2046
|
extraction_mode=ExtractMode.FAST,
|
|
2047
|
+
parse_model=PublicModelName.OPENAI_GPT_4_O,
|
|
2048
|
+
extract_model=ExtractModels.OPENAI_GPT_4_1,
|
|
2001
2049
|
chunk_mode=DocumentChunkMode.PAGE,
|
|
2002
2050
|
),
|
|
2003
2051
|
file=FileData(
|
|
@@ -229,7 +229,9 @@ class OrganizationsClient:
|
|
|
229
229
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
230
230
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
231
231
|
|
|
232
|
-
def update_organization(
|
|
232
|
+
def update_organization(
|
|
233
|
+
self, organization_id: str, *, name: str, feature_flags: typing.Optional[typing.Dict[str, typing.Any]] = OMIT
|
|
234
|
+
) -> Organization:
|
|
233
235
|
"""
|
|
234
236
|
Update an existing organization.
|
|
235
237
|
|
|
@@ -237,6 +239,8 @@ class OrganizationsClient:
|
|
|
237
239
|
- organization_id: str.
|
|
238
240
|
|
|
239
241
|
- name: str. A name for the organization.
|
|
242
|
+
|
|
243
|
+
- feature_flags: typing.Optional[typing.Dict[str, typing.Any]].
|
|
240
244
|
---
|
|
241
245
|
from llama_cloud.client import LlamaCloud
|
|
242
246
|
|
|
@@ -248,10 +252,13 @@ class OrganizationsClient:
|
|
|
248
252
|
name="string",
|
|
249
253
|
)
|
|
250
254
|
"""
|
|
255
|
+
_request: typing.Dict[str, typing.Any] = {"name": name}
|
|
256
|
+
if feature_flags is not OMIT:
|
|
257
|
+
_request["feature_flags"] = feature_flags
|
|
251
258
|
_response = self._client_wrapper.httpx_client.request(
|
|
252
259
|
"PUT",
|
|
253
260
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/organizations/{organization_id}"),
|
|
254
|
-
json=jsonable_encoder(
|
|
261
|
+
json=jsonable_encoder(_request),
|
|
255
262
|
headers=self._client_wrapper.get_headers(),
|
|
256
263
|
timeout=60,
|
|
257
264
|
)
|
|
@@ -937,7 +944,9 @@ class AsyncOrganizationsClient:
|
|
|
937
944
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
938
945
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
939
946
|
|
|
940
|
-
async def update_organization(
|
|
947
|
+
async def update_organization(
|
|
948
|
+
self, organization_id: str, *, name: str, feature_flags: typing.Optional[typing.Dict[str, typing.Any]] = OMIT
|
|
949
|
+
) -> Organization:
|
|
941
950
|
"""
|
|
942
951
|
Update an existing organization.
|
|
943
952
|
|
|
@@ -945,6 +954,8 @@ class AsyncOrganizationsClient:
|
|
|
945
954
|
- organization_id: str.
|
|
946
955
|
|
|
947
956
|
- name: str. A name for the organization.
|
|
957
|
+
|
|
958
|
+
- feature_flags: typing.Optional[typing.Dict[str, typing.Any]].
|
|
948
959
|
---
|
|
949
960
|
from llama_cloud.client import AsyncLlamaCloud
|
|
950
961
|
|
|
@@ -956,10 +967,13 @@ class AsyncOrganizationsClient:
|
|
|
956
967
|
name="string",
|
|
957
968
|
)
|
|
958
969
|
"""
|
|
970
|
+
_request: typing.Dict[str, typing.Any] = {"name": name}
|
|
971
|
+
if feature_flags is not OMIT:
|
|
972
|
+
_request["feature_flags"] = feature_flags
|
|
959
973
|
_response = await self._client_wrapper.httpx_client.request(
|
|
960
974
|
"PUT",
|
|
961
975
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/organizations/{organization_id}"),
|
|
962
|
-
json=jsonable_encoder(
|
|
976
|
+
json=jsonable_encoder(_request),
|
|
963
977
|
headers=self._client_wrapper.get_headers(),
|
|
964
978
|
timeout=60,
|
|
965
979
|
)
|
|
@@ -228,6 +228,11 @@ class ParsingClient:
|
|
|
228
228
|
high_res_ocr: bool,
|
|
229
229
|
html_make_all_elements_visible: bool,
|
|
230
230
|
layout_aware: bool,
|
|
231
|
+
specialized_chart_parsing_agentic: bool,
|
|
232
|
+
specialized_chart_parsing_plus: bool,
|
|
233
|
+
specialized_chart_parsing_efficient: bool,
|
|
234
|
+
specialized_image_parsing: bool,
|
|
235
|
+
precise_bounding_box: bool,
|
|
231
236
|
html_remove_fixed_elements: bool,
|
|
232
237
|
html_remove_navigation_elements: bool,
|
|
233
238
|
http_proxy: str,
|
|
@@ -250,6 +255,8 @@ class ParsingClient:
|
|
|
250
255
|
preserve_very_small_text: bool,
|
|
251
256
|
skip_diagonal_text: bool,
|
|
252
257
|
spreadsheet_extract_sub_tables: bool,
|
|
258
|
+
spreadsheet_force_formula_computation: bool,
|
|
259
|
+
inline_images_in_markdown: bool,
|
|
253
260
|
structured_output: bool,
|
|
254
261
|
structured_output_json_schema: str,
|
|
255
262
|
structured_output_json_schema_name: str,
|
|
@@ -360,6 +367,16 @@ class ParsingClient:
|
|
|
360
367
|
|
|
361
368
|
- layout_aware: bool.
|
|
362
369
|
|
|
370
|
+
- specialized_chart_parsing_agentic: bool.
|
|
371
|
+
|
|
372
|
+
- specialized_chart_parsing_plus: bool.
|
|
373
|
+
|
|
374
|
+
- specialized_chart_parsing_efficient: bool.
|
|
375
|
+
|
|
376
|
+
- specialized_image_parsing: bool.
|
|
377
|
+
|
|
378
|
+
- precise_bounding_box: bool.
|
|
379
|
+
|
|
363
380
|
- html_remove_fixed_elements: bool.
|
|
364
381
|
|
|
365
382
|
- html_remove_navigation_elements: bool.
|
|
@@ -404,6 +421,10 @@ class ParsingClient:
|
|
|
404
421
|
|
|
405
422
|
- spreadsheet_extract_sub_tables: bool.
|
|
406
423
|
|
|
424
|
+
- spreadsheet_force_formula_computation: bool.
|
|
425
|
+
|
|
426
|
+
- inline_images_in_markdown: bool.
|
|
427
|
+
|
|
407
428
|
- structured_output: bool.
|
|
408
429
|
|
|
409
430
|
- structured_output_json_schema: str.
|
|
@@ -526,6 +547,11 @@ class ParsingClient:
|
|
|
526
547
|
"high_res_ocr": high_res_ocr,
|
|
527
548
|
"html_make_all_elements_visible": html_make_all_elements_visible,
|
|
528
549
|
"layout_aware": layout_aware,
|
|
550
|
+
"specialized_chart_parsing_agentic": specialized_chart_parsing_agentic,
|
|
551
|
+
"specialized_chart_parsing_plus": specialized_chart_parsing_plus,
|
|
552
|
+
"specialized_chart_parsing_efficient": specialized_chart_parsing_efficient,
|
|
553
|
+
"specialized_image_parsing": specialized_image_parsing,
|
|
554
|
+
"precise_bounding_box": precise_bounding_box,
|
|
529
555
|
"html_remove_fixed_elements": html_remove_fixed_elements,
|
|
530
556
|
"html_remove_navigation_elements": html_remove_navigation_elements,
|
|
531
557
|
"http_proxy": http_proxy,
|
|
@@ -547,6 +573,8 @@ class ParsingClient:
|
|
|
547
573
|
"preserve_very_small_text": preserve_very_small_text,
|
|
548
574
|
"skip_diagonal_text": skip_diagonal_text,
|
|
549
575
|
"spreadsheet_extract_sub_tables": spreadsheet_extract_sub_tables,
|
|
576
|
+
"spreadsheet_force_formula_computation": spreadsheet_force_formula_computation,
|
|
577
|
+
"inline_images_in_markdown": inline_images_in_markdown,
|
|
550
578
|
"structured_output": structured_output,
|
|
551
579
|
"structured_output_json_schema": structured_output_json_schema,
|
|
552
580
|
"structured_output_json_schema_name": structured_output_json_schema_name,
|
|
@@ -1404,6 +1432,11 @@ class AsyncParsingClient:
|
|
|
1404
1432
|
high_res_ocr: bool,
|
|
1405
1433
|
html_make_all_elements_visible: bool,
|
|
1406
1434
|
layout_aware: bool,
|
|
1435
|
+
specialized_chart_parsing_agentic: bool,
|
|
1436
|
+
specialized_chart_parsing_plus: bool,
|
|
1437
|
+
specialized_chart_parsing_efficient: bool,
|
|
1438
|
+
specialized_image_parsing: bool,
|
|
1439
|
+
precise_bounding_box: bool,
|
|
1407
1440
|
html_remove_fixed_elements: bool,
|
|
1408
1441
|
html_remove_navigation_elements: bool,
|
|
1409
1442
|
http_proxy: str,
|
|
@@ -1426,6 +1459,8 @@ class AsyncParsingClient:
|
|
|
1426
1459
|
preserve_very_small_text: bool,
|
|
1427
1460
|
skip_diagonal_text: bool,
|
|
1428
1461
|
spreadsheet_extract_sub_tables: bool,
|
|
1462
|
+
spreadsheet_force_formula_computation: bool,
|
|
1463
|
+
inline_images_in_markdown: bool,
|
|
1429
1464
|
structured_output: bool,
|
|
1430
1465
|
structured_output_json_schema: str,
|
|
1431
1466
|
structured_output_json_schema_name: str,
|
|
@@ -1536,6 +1571,16 @@ class AsyncParsingClient:
|
|
|
1536
1571
|
|
|
1537
1572
|
- layout_aware: bool.
|
|
1538
1573
|
|
|
1574
|
+
- specialized_chart_parsing_agentic: bool.
|
|
1575
|
+
|
|
1576
|
+
- specialized_chart_parsing_plus: bool.
|
|
1577
|
+
|
|
1578
|
+
- specialized_chart_parsing_efficient: bool.
|
|
1579
|
+
|
|
1580
|
+
- specialized_image_parsing: bool.
|
|
1581
|
+
|
|
1582
|
+
- precise_bounding_box: bool.
|
|
1583
|
+
|
|
1539
1584
|
- html_remove_fixed_elements: bool.
|
|
1540
1585
|
|
|
1541
1586
|
- html_remove_navigation_elements: bool.
|
|
@@ -1580,6 +1625,10 @@ class AsyncParsingClient:
|
|
|
1580
1625
|
|
|
1581
1626
|
- spreadsheet_extract_sub_tables: bool.
|
|
1582
1627
|
|
|
1628
|
+
- spreadsheet_force_formula_computation: bool.
|
|
1629
|
+
|
|
1630
|
+
- inline_images_in_markdown: bool.
|
|
1631
|
+
|
|
1583
1632
|
- structured_output: bool.
|
|
1584
1633
|
|
|
1585
1634
|
- structured_output_json_schema: str.
|
|
@@ -1702,6 +1751,11 @@ class AsyncParsingClient:
|
|
|
1702
1751
|
"high_res_ocr": high_res_ocr,
|
|
1703
1752
|
"html_make_all_elements_visible": html_make_all_elements_visible,
|
|
1704
1753
|
"layout_aware": layout_aware,
|
|
1754
|
+
"specialized_chart_parsing_agentic": specialized_chart_parsing_agentic,
|
|
1755
|
+
"specialized_chart_parsing_plus": specialized_chart_parsing_plus,
|
|
1756
|
+
"specialized_chart_parsing_efficient": specialized_chart_parsing_efficient,
|
|
1757
|
+
"specialized_image_parsing": specialized_image_parsing,
|
|
1758
|
+
"precise_bounding_box": precise_bounding_box,
|
|
1705
1759
|
"html_remove_fixed_elements": html_remove_fixed_elements,
|
|
1706
1760
|
"html_remove_navigation_elements": html_remove_navigation_elements,
|
|
1707
1761
|
"http_proxy": http_proxy,
|
|
@@ -1723,6 +1777,8 @@ class AsyncParsingClient:
|
|
|
1723
1777
|
"preserve_very_small_text": preserve_very_small_text,
|
|
1724
1778
|
"skip_diagonal_text": skip_diagonal_text,
|
|
1725
1779
|
"spreadsheet_extract_sub_tables": spreadsheet_extract_sub_tables,
|
|
1780
|
+
"spreadsheet_force_formula_computation": spreadsheet_force_formula_computation,
|
|
1781
|
+
"inline_images_in_markdown": inline_images_in_markdown,
|
|
1726
1782
|
"structured_output": structured_output,
|
|
1727
1783
|
"structured_output_json_schema": structured_output_json_schema,
|
|
1728
1784
|
"structured_output_json_schema_name": structured_output_json_schema_name,
|
|
@@ -1706,6 +1706,44 @@ class PipelinesClient:
|
|
|
1706
1706
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1707
1707
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1708
1708
|
|
|
1709
|
+
def sync_pipeline_document(self, document_id: str, pipeline_id: str) -> typing.Any:
|
|
1710
|
+
"""
|
|
1711
|
+
Sync a specific document for a pipeline.
|
|
1712
|
+
|
|
1713
|
+
Parameters:
|
|
1714
|
+
- document_id: str.
|
|
1715
|
+
|
|
1716
|
+
- pipeline_id: str.
|
|
1717
|
+
---
|
|
1718
|
+
from llama_cloud.client import LlamaCloud
|
|
1719
|
+
|
|
1720
|
+
client = LlamaCloud(
|
|
1721
|
+
token="YOUR_TOKEN",
|
|
1722
|
+
)
|
|
1723
|
+
client.pipelines.sync_pipeline_document(
|
|
1724
|
+
document_id="string",
|
|
1725
|
+
pipeline_id="string",
|
|
1726
|
+
)
|
|
1727
|
+
"""
|
|
1728
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
1729
|
+
"POST",
|
|
1730
|
+
urllib.parse.urljoin(
|
|
1731
|
+
f"{self._client_wrapper.get_base_url()}/",
|
|
1732
|
+
f"api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync",
|
|
1733
|
+
),
|
|
1734
|
+
headers=self._client_wrapper.get_headers(),
|
|
1735
|
+
timeout=60,
|
|
1736
|
+
)
|
|
1737
|
+
if 200 <= _response.status_code < 300:
|
|
1738
|
+
return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
|
|
1739
|
+
if _response.status_code == 422:
|
|
1740
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
1741
|
+
try:
|
|
1742
|
+
_response_json = _response.json()
|
|
1743
|
+
except JSONDecodeError:
|
|
1744
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1745
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1746
|
+
|
|
1709
1747
|
def list_pipeline_document_chunks(self, document_id: str, pipeline_id: str) -> typing.List[TextNode]:
|
|
1710
1748
|
"""
|
|
1711
1749
|
Return a list of chunks for a pipeline document.
|
|
@@ -1744,6 +1782,50 @@ class PipelinesClient:
|
|
|
1744
1782
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1745
1783
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1746
1784
|
|
|
1785
|
+
def force_sync_all_pipeline_documents(
|
|
1786
|
+
self, pipeline_id: str, *, batch_size: typing.Optional[int] = None, only_failed: typing.Optional[bool] = None
|
|
1787
|
+
) -> None:
|
|
1788
|
+
"""
|
|
1789
|
+
Force sync all documents in a pipeline by batching document ingestion jobs.
|
|
1790
|
+
|
|
1791
|
+
- Iterates all document refs for the pipeline
|
|
1792
|
+
- Enqueues document ingestion jobs in batches of `batch_size`
|
|
1793
|
+
|
|
1794
|
+
Parameters:
|
|
1795
|
+
- pipeline_id: str.
|
|
1796
|
+
|
|
1797
|
+
- batch_size: typing.Optional[int].
|
|
1798
|
+
|
|
1799
|
+
- only_failed: typing.Optional[bool]. Only sync retriable documents (failed/cancelled/not-started/stalled-in-progress)
|
|
1800
|
+
---
|
|
1801
|
+
from llama_cloud.client import LlamaCloud
|
|
1802
|
+
|
|
1803
|
+
client = LlamaCloud(
|
|
1804
|
+
token="YOUR_TOKEN",
|
|
1805
|
+
)
|
|
1806
|
+
client.pipelines.force_sync_all_pipeline_documents(
|
|
1807
|
+
pipeline_id="string",
|
|
1808
|
+
)
|
|
1809
|
+
"""
|
|
1810
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
1811
|
+
"POST",
|
|
1812
|
+
urllib.parse.urljoin(
|
|
1813
|
+
f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/documents/force-sync-all"
|
|
1814
|
+
),
|
|
1815
|
+
params=remove_none_from_dict({"batch_size": batch_size, "only_failed": only_failed}),
|
|
1816
|
+
headers=self._client_wrapper.get_headers(),
|
|
1817
|
+
timeout=60,
|
|
1818
|
+
)
|
|
1819
|
+
if 200 <= _response.status_code < 300:
|
|
1820
|
+
return
|
|
1821
|
+
if _response.status_code == 422:
|
|
1822
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
1823
|
+
try:
|
|
1824
|
+
_response_json = _response.json()
|
|
1825
|
+
except JSONDecodeError:
|
|
1826
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1827
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1828
|
+
|
|
1747
1829
|
|
|
1748
1830
|
class AsyncPipelinesClient:
|
|
1749
1831
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -3397,6 +3479,44 @@ class AsyncPipelinesClient:
|
|
|
3397
3479
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
3398
3480
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
3399
3481
|
|
|
3482
|
+
async def sync_pipeline_document(self, document_id: str, pipeline_id: str) -> typing.Any:
|
|
3483
|
+
"""
|
|
3484
|
+
Sync a specific document for a pipeline.
|
|
3485
|
+
|
|
3486
|
+
Parameters:
|
|
3487
|
+
- document_id: str.
|
|
3488
|
+
|
|
3489
|
+
- pipeline_id: str.
|
|
3490
|
+
---
|
|
3491
|
+
from llama_cloud.client import AsyncLlamaCloud
|
|
3492
|
+
|
|
3493
|
+
client = AsyncLlamaCloud(
|
|
3494
|
+
token="YOUR_TOKEN",
|
|
3495
|
+
)
|
|
3496
|
+
await client.pipelines.sync_pipeline_document(
|
|
3497
|
+
document_id="string",
|
|
3498
|
+
pipeline_id="string",
|
|
3499
|
+
)
|
|
3500
|
+
"""
|
|
3501
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
3502
|
+
"POST",
|
|
3503
|
+
urllib.parse.urljoin(
|
|
3504
|
+
f"{self._client_wrapper.get_base_url()}/",
|
|
3505
|
+
f"api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync",
|
|
3506
|
+
),
|
|
3507
|
+
headers=self._client_wrapper.get_headers(),
|
|
3508
|
+
timeout=60,
|
|
3509
|
+
)
|
|
3510
|
+
if 200 <= _response.status_code < 300:
|
|
3511
|
+
return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
|
|
3512
|
+
if _response.status_code == 422:
|
|
3513
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
3514
|
+
try:
|
|
3515
|
+
_response_json = _response.json()
|
|
3516
|
+
except JSONDecodeError:
|
|
3517
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
3518
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
3519
|
+
|
|
3400
3520
|
async def list_pipeline_document_chunks(self, document_id: str, pipeline_id: str) -> typing.List[TextNode]:
|
|
3401
3521
|
"""
|
|
3402
3522
|
Return a list of chunks for a pipeline document.
|
|
@@ -3434,3 +3554,47 @@ class AsyncPipelinesClient:
|
|
|
3434
3554
|
except JSONDecodeError:
|
|
3435
3555
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
3436
3556
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
3557
|
+
|
|
3558
|
+
async def force_sync_all_pipeline_documents(
|
|
3559
|
+
self, pipeline_id: str, *, batch_size: typing.Optional[int] = None, only_failed: typing.Optional[bool] = None
|
|
3560
|
+
) -> None:
|
|
3561
|
+
"""
|
|
3562
|
+
Force sync all documents in a pipeline by batching document ingestion jobs.
|
|
3563
|
+
|
|
3564
|
+
- Iterates all document refs for the pipeline
|
|
3565
|
+
- Enqueues document ingestion jobs in batches of `batch_size`
|
|
3566
|
+
|
|
3567
|
+
Parameters:
|
|
3568
|
+
- pipeline_id: str.
|
|
3569
|
+
|
|
3570
|
+
- batch_size: typing.Optional[int].
|
|
3571
|
+
|
|
3572
|
+
- only_failed: typing.Optional[bool]. Only sync retriable documents (failed/cancelled/not-started/stalled-in-progress)
|
|
3573
|
+
---
|
|
3574
|
+
from llama_cloud.client import AsyncLlamaCloud
|
|
3575
|
+
|
|
3576
|
+
client = AsyncLlamaCloud(
|
|
3577
|
+
token="YOUR_TOKEN",
|
|
3578
|
+
)
|
|
3579
|
+
await client.pipelines.force_sync_all_pipeline_documents(
|
|
3580
|
+
pipeline_id="string",
|
|
3581
|
+
)
|
|
3582
|
+
"""
|
|
3583
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
3584
|
+
"POST",
|
|
3585
|
+
urllib.parse.urljoin(
|
|
3586
|
+
f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/documents/force-sync-all"
|
|
3587
|
+
),
|
|
3588
|
+
params=remove_none_from_dict({"batch_size": batch_size, "only_failed": only_failed}),
|
|
3589
|
+
headers=self._client_wrapper.get_headers(),
|
|
3590
|
+
timeout=60,
|
|
3591
|
+
)
|
|
3592
|
+
if 200 <= _response.status_code < 300:
|
|
3593
|
+
return
|
|
3594
|
+
if _response.status_code == 422:
|
|
3595
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
3596
|
+
try:
|
|
3597
|
+
_response_json = _response.json()
|
|
3598
|
+
except JSONDecodeError:
|
|
3599
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
3600
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|