llama-cloud 0.1.18__py3-none-any.whl → 0.1.20__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.

Files changed (92) hide show
  1. llama_cloud/__init__.py +202 -42
  2. llama_cloud/client.py +3 -0
  3. llama_cloud/resources/__init__.py +61 -2
  4. llama_cloud/resources/beta/__init__.py +2 -0
  5. llama_cloud/resources/beta/client.py +371 -0
  6. llama_cloud/resources/data_sinks/__init__.py +18 -2
  7. llama_cloud/resources/data_sinks/client.py +2 -94
  8. llama_cloud/resources/data_sinks/types/__init__.py +18 -2
  9. llama_cloud/resources/data_sinks/types/data_sink_update_component.py +65 -7
  10. llama_cloud/resources/data_sources/__init__.py +30 -2
  11. llama_cloud/resources/data_sources/types/__init__.py +28 -1
  12. llama_cloud/resources/data_sources/types/data_source_update_component.py +2 -23
  13. llama_cloud/resources/data_sources/types/data_source_update_component_one.py +122 -0
  14. llama_cloud/resources/embedding_model_configs/client.py +82 -22
  15. llama_cloud/resources/files/client.py +18 -4
  16. llama_cloud/resources/llama_extract/__init__.py +21 -0
  17. llama_cloud/resources/llama_extract/client.py +227 -114
  18. llama_cloud/resources/llama_extract/types/__init__.py +21 -0
  19. llama_cloud/resources/parsing/client.py +123 -4
  20. llama_cloud/resources/pipelines/client.py +116 -11
  21. llama_cloud/types/__init__.py +172 -52
  22. llama_cloud/types/{extract_schema_validate_request.py → audio_block.py} +5 -3
  23. llama_cloud/types/batch.py +47 -0
  24. llama_cloud/types/batch_item.py +40 -0
  25. llama_cloud/types/batch_paginated_list.py +35 -0
  26. llama_cloud/types/{base_prompt_template.py → batch_public_output.py} +7 -7
  27. llama_cloud/types/cloud_confluence_data_source.py +1 -0
  28. llama_cloud/types/cloud_jira_data_source.py +0 -4
  29. llama_cloud/types/cloud_postgres_vector_store.py +2 -0
  30. llama_cloud/types/cloud_sharepoint_data_source.py +1 -0
  31. llama_cloud/types/data_sink_component.py +65 -7
  32. llama_cloud/types/data_sink_create_component.py +65 -7
  33. llama_cloud/types/data_source_component.py +2 -23
  34. llama_cloud/types/data_source_component_one.py +122 -0
  35. llama_cloud/types/data_source_create_component.py +2 -23
  36. llama_cloud/types/data_source_create_component_one.py +122 -0
  37. llama_cloud/types/{extract_agent_update.py → data_source_update_dispatcher_config.py} +6 -6
  38. llama_cloud/types/{node_parser.py → delete_params.py} +7 -9
  39. llama_cloud/types/{extract_agent_create.py → document_ingestion_job_params.py} +11 -7
  40. llama_cloud/types/extract_config.py +2 -0
  41. llama_cloud/types/extract_job_create.py +1 -2
  42. llama_cloud/types/fail_page_mode.py +29 -0
  43. llama_cloud/types/file_count_by_status_response.py +37 -0
  44. llama_cloud/types/file_parse_public.py +36 -0
  45. llama_cloud/types/job_names.py +8 -12
  46. llama_cloud/types/job_record.py +2 -2
  47. llama_cloud/types/job_record_parameters.py +111 -0
  48. llama_cloud/types/l_lama_parse_transform_config.py +37 -0
  49. llama_cloud/types/legacy_parse_job_config.py +189 -0
  50. llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +13 -1
  51. llama_cloud/types/llama_parse_parameters.py +8 -0
  52. llama_cloud/types/load_files_job_config.py +35 -0
  53. llama_cloud/types/message_role.py +4 -0
  54. llama_cloud/types/parse_job_config.py +134 -0
  55. llama_cloud/types/pg_vector_distance_method.py +43 -0
  56. llama_cloud/types/{extract_job_create_batch.py → pg_vector_hnsw_settings.py} +12 -9
  57. llama_cloud/types/pg_vector_vector_type.py +35 -0
  58. llama_cloud/types/pipeline.py +2 -4
  59. llama_cloud/types/pipeline_create.py +3 -2
  60. llama_cloud/types/pipeline_data_source.py +3 -0
  61. llama_cloud/types/pipeline_data_source_component.py +2 -23
  62. llama_cloud/types/pipeline_data_source_component_one.py +122 -0
  63. llama_cloud/types/pipeline_data_source_status.py +33 -0
  64. llama_cloud/types/pipeline_file.py +1 -0
  65. llama_cloud/types/pipeline_file_update_dispatcher_config.py +38 -0
  66. llama_cloud/types/{markdown_node_parser.py → pipeline_file_updater_config.py} +14 -15
  67. llama_cloud/types/pipeline_managed_ingestion_job_params.py +37 -0
  68. llama_cloud/types/pipeline_metadata_config.py +36 -0
  69. llama_cloud/types/prompt_conf.py +3 -0
  70. llama_cloud/types/struct_parse_conf.py +4 -1
  71. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/METADATA +4 -2
  72. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/RECORD +82 -68
  73. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/WHEEL +1 -1
  74. llama_cloud/types/character_splitter.py +0 -46
  75. llama_cloud/types/code_splitter.py +0 -50
  76. llama_cloud/types/configured_transformation_item.py +0 -46
  77. llama_cloud/types/configured_transformation_item_component.py +0 -22
  78. llama_cloud/types/llm.py +0 -60
  79. llama_cloud/types/markdown_element_node_parser.py +0 -51
  80. llama_cloud/types/page_splitter_node_parser.py +0 -42
  81. llama_cloud/types/pydantic_program_mode.py +0 -41
  82. llama_cloud/types/sentence_splitter.py +0 -50
  83. llama_cloud/types/token_text_splitter.py +0 -47
  84. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_create_data_schema.py +0 -0
  85. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_create_data_schema_zero_value.py +0 -0
  86. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_update_data_schema.py +0 -0
  87. /llama_cloud/{types → resources/llama_extract/types}/extract_agent_update_data_schema_zero_value.py +0 -0
  88. /llama_cloud/{types → resources/llama_extract/types}/extract_job_create_batch_data_schema_override.py +0 -0
  89. /llama_cloud/{types → resources/llama_extract/types}/extract_job_create_batch_data_schema_override_zero_value.py +0 -0
  90. /llama_cloud/{types → resources/llama_extract/types}/extract_schema_validate_request_data_schema.py +0 -0
  91. /llama_cloud/{types → resources/llama_extract/types}/extract_schema_validate_request_data_schema_zero_value.py +0 -0
  92. {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/LICENSE +0 -0
@@ -9,6 +9,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ...core.jsonable_encoder import jsonable_encoder
10
10
  from ...core.remove_none_from_dict import remove_none_from_dict
11
11
  from ...errors.unprocessable_entity_error import UnprocessableEntityError
12
+ from ...types.fail_page_mode import FailPageMode
12
13
  from ...types.http_validation_error import HttpValidationError
13
14
  from ...types.llama_parse_supported_file_extensions import LlamaParseSupportedFileExtensions
14
15
  from ...types.parser_languages import ParserLanguages
@@ -203,6 +204,7 @@ class ParsingClient:
203
204
  auto_mode_trigger_on_table_in_page: bool,
204
205
  auto_mode_trigger_on_text_in_page: str,
205
206
  auto_mode_trigger_on_regexp_in_page: str,
207
+ auto_mode_configuration_json: str,
206
208
  azure_openai_api_version: str,
207
209
  azure_openai_deployment_name: str,
208
210
  azure_openai_endpoint: str,
@@ -250,6 +252,10 @@ class ParsingClient:
250
252
  webhook_url: str,
251
253
  preset: str,
252
254
  parse_mode: typing.Optional[ParsingMode] = OMIT,
255
+ page_error_tolerance: float,
256
+ replace_failed_page_mode: typing.Optional[FailPageMode] = OMIT,
257
+ replace_failed_page_with_error_message_prefix: str,
258
+ replace_failed_page_with_error_message_suffix: str,
253
259
  system_prompt: str,
254
260
  system_prompt_append: str,
255
261
  user_prompt: str,
@@ -259,8 +265,10 @@ class ParsingClient:
259
265
  strict_mode_image_ocr: bool,
260
266
  strict_mode_reconstruction: bool,
261
267
  strict_mode_buggy_font: bool,
268
+ save_images: bool,
262
269
  ignore_document_elements_for_layout_detection: bool,
263
270
  output_tables_as_html: bool,
271
+ markdown_table_multiline_header_separator: str,
264
272
  use_vendor_multimodal_model: bool,
265
273
  bounding_box: str,
266
274
  gpt_4_o_mode: bool,
@@ -275,8 +283,6 @@ class ParsingClient:
275
283
  formatting_instruction: str,
276
284
  ) -> ParsingJob:
277
285
  """
278
- Upload a file to s3 and create a job. return a job id
279
-
280
286
  Parameters:
281
287
  - organization_id: typing.Optional[str].
282
288
 
@@ -298,6 +304,8 @@ class ParsingClient:
298
304
 
299
305
  - auto_mode_trigger_on_regexp_in_page: str.
300
306
 
307
+ - auto_mode_configuration_json: str.
308
+
301
309
  - azure_openai_api_version: str.
302
310
 
303
311
  - azure_openai_deployment_name: str.
@@ -392,6 +400,14 @@ class ParsingClient:
392
400
 
393
401
  - parse_mode: typing.Optional[ParsingMode].
394
402
 
403
+ - page_error_tolerance: float.
404
+
405
+ - replace_failed_page_mode: typing.Optional[FailPageMode].
406
+
407
+ - replace_failed_page_with_error_message_prefix: str.
408
+
409
+ - replace_failed_page_with_error_message_suffix: str.
410
+
395
411
  - system_prompt: str.
396
412
 
397
413
  - system_prompt_append: str.
@@ -410,10 +426,14 @@ class ParsingClient:
410
426
 
411
427
  - strict_mode_buggy_font: bool.
412
428
 
429
+ - save_images: bool.
430
+
413
431
  - ignore_document_elements_for_layout_detection: bool.
414
432
 
415
433
  - output_tables_as_html: bool.
416
434
 
435
+ - markdown_table_multiline_header_separator: str.
436
+
417
437
  - use_vendor_multimodal_model: bool.
418
438
 
419
439
  - bounding_box: str.
@@ -446,6 +466,7 @@ class ParsingClient:
446
466
  "auto_mode_trigger_on_table_in_page": auto_mode_trigger_on_table_in_page,
447
467
  "auto_mode_trigger_on_text_in_page": auto_mode_trigger_on_text_in_page,
448
468
  "auto_mode_trigger_on_regexp_in_page": auto_mode_trigger_on_regexp_in_page,
469
+ "auto_mode_configuration_json": auto_mode_configuration_json,
449
470
  "azure_openai_api_version": azure_openai_api_version,
450
471
  "azure_openai_deployment_name": azure_openai_deployment_name,
451
472
  "azure_openai_endpoint": azure_openai_endpoint,
@@ -491,6 +512,9 @@ class ParsingClient:
491
512
  "model": model,
492
513
  "webhook_url": webhook_url,
493
514
  "preset": preset,
515
+ "page_error_tolerance": page_error_tolerance,
516
+ "replace_failed_page_with_error_message_prefix": replace_failed_page_with_error_message_prefix,
517
+ "replace_failed_page_with_error_message_suffix": replace_failed_page_with_error_message_suffix,
494
518
  "system_prompt": system_prompt,
495
519
  "system_prompt_append": system_prompt_append,
496
520
  "user_prompt": user_prompt,
@@ -500,8 +524,10 @@ class ParsingClient:
500
524
  "strict_mode_image_ocr": strict_mode_image_ocr,
501
525
  "strict_mode_reconstruction": strict_mode_reconstruction,
502
526
  "strict_mode_buggy_font": strict_mode_buggy_font,
527
+ "save_images": save_images,
503
528
  "ignore_document_elements_for_layout_detection": ignore_document_elements_for_layout_detection,
504
529
  "output_tables_as_HTML": output_tables_as_html,
530
+ "markdown_table_multiline_header_separator": markdown_table_multiline_header_separator,
505
531
  "use_vendor_multimodal_model": use_vendor_multimodal_model,
506
532
  "bounding_box": bounding_box,
507
533
  "gpt4o_mode": gpt_4_o_mode,
@@ -521,6 +547,8 @@ class ParsingClient:
521
547
  _request["max_pages"] = max_pages
522
548
  if parse_mode is not OMIT:
523
549
  _request["parse_mode"] = parse_mode
550
+ if replace_failed_page_mode is not OMIT:
551
+ _request["replace_failed_page_mode"] = replace_failed_page_mode
524
552
  _response = self._client_wrapper.httpx_client.request(
525
553
  "POST",
526
554
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/upload"),
@@ -571,6 +599,38 @@ class ParsingClient:
571
599
  raise ApiError(status_code=_response.status_code, body=_response.text)
572
600
  raise ApiError(status_code=_response.status_code, body=_response_json)
573
601
 
602
+ def get_job_parameters(self, job_id: str) -> typing.Any:
603
+ """
604
+ Get a job by id
605
+
606
+ Parameters:
607
+ - job_id: str.
608
+ ---
609
+ from llama_cloud.client import LlamaCloud
610
+
611
+ client = LlamaCloud(
612
+ token="YOUR_TOKEN",
613
+ )
614
+ client.parsing.get_job_parameters(
615
+ job_id="string",
616
+ )
617
+ """
618
+ _response = self._client_wrapper.httpx_client.request(
619
+ "GET",
620
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/parameters"),
621
+ headers=self._client_wrapper.get_headers(),
622
+ timeout=60,
623
+ )
624
+ if 200 <= _response.status_code < 300:
625
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
626
+ if _response.status_code == 422:
627
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
628
+ try:
629
+ _response_json = _response.json()
630
+ except JSONDecodeError:
631
+ raise ApiError(status_code=_response.status_code, body=_response.text)
632
+ raise ApiError(status_code=_response.status_code, body=_response_json)
633
+
574
634
  def get_parsing_job_details(self, job_id: str) -> typing.Any:
575
635
  """
576
636
  Get a job by id
@@ -1155,6 +1215,7 @@ class AsyncParsingClient:
1155
1215
  auto_mode_trigger_on_table_in_page: bool,
1156
1216
  auto_mode_trigger_on_text_in_page: str,
1157
1217
  auto_mode_trigger_on_regexp_in_page: str,
1218
+ auto_mode_configuration_json: str,
1158
1219
  azure_openai_api_version: str,
1159
1220
  azure_openai_deployment_name: str,
1160
1221
  azure_openai_endpoint: str,
@@ -1202,6 +1263,10 @@ class AsyncParsingClient:
1202
1263
  webhook_url: str,
1203
1264
  preset: str,
1204
1265
  parse_mode: typing.Optional[ParsingMode] = OMIT,
1266
+ page_error_tolerance: float,
1267
+ replace_failed_page_mode: typing.Optional[FailPageMode] = OMIT,
1268
+ replace_failed_page_with_error_message_prefix: str,
1269
+ replace_failed_page_with_error_message_suffix: str,
1205
1270
  system_prompt: str,
1206
1271
  system_prompt_append: str,
1207
1272
  user_prompt: str,
@@ -1211,8 +1276,10 @@ class AsyncParsingClient:
1211
1276
  strict_mode_image_ocr: bool,
1212
1277
  strict_mode_reconstruction: bool,
1213
1278
  strict_mode_buggy_font: bool,
1279
+ save_images: bool,
1214
1280
  ignore_document_elements_for_layout_detection: bool,
1215
1281
  output_tables_as_html: bool,
1282
+ markdown_table_multiline_header_separator: str,
1216
1283
  use_vendor_multimodal_model: bool,
1217
1284
  bounding_box: str,
1218
1285
  gpt_4_o_mode: bool,
@@ -1227,8 +1294,6 @@ class AsyncParsingClient:
1227
1294
  formatting_instruction: str,
1228
1295
  ) -> ParsingJob:
1229
1296
  """
1230
- Upload a file to s3 and create a job. return a job id
1231
-
1232
1297
  Parameters:
1233
1298
  - organization_id: typing.Optional[str].
1234
1299
 
@@ -1250,6 +1315,8 @@ class AsyncParsingClient:
1250
1315
 
1251
1316
  - auto_mode_trigger_on_regexp_in_page: str.
1252
1317
 
1318
+ - auto_mode_configuration_json: str.
1319
+
1253
1320
  - azure_openai_api_version: str.
1254
1321
 
1255
1322
  - azure_openai_deployment_name: str.
@@ -1344,6 +1411,14 @@ class AsyncParsingClient:
1344
1411
 
1345
1412
  - parse_mode: typing.Optional[ParsingMode].
1346
1413
 
1414
+ - page_error_tolerance: float.
1415
+
1416
+ - replace_failed_page_mode: typing.Optional[FailPageMode].
1417
+
1418
+ - replace_failed_page_with_error_message_prefix: str.
1419
+
1420
+ - replace_failed_page_with_error_message_suffix: str.
1421
+
1347
1422
  - system_prompt: str.
1348
1423
 
1349
1424
  - system_prompt_append: str.
@@ -1362,10 +1437,14 @@ class AsyncParsingClient:
1362
1437
 
1363
1438
  - strict_mode_buggy_font: bool.
1364
1439
 
1440
+ - save_images: bool.
1441
+
1365
1442
  - ignore_document_elements_for_layout_detection: bool.
1366
1443
 
1367
1444
  - output_tables_as_html: bool.
1368
1445
 
1446
+ - markdown_table_multiline_header_separator: str.
1447
+
1369
1448
  - use_vendor_multimodal_model: bool.
1370
1449
 
1371
1450
  - bounding_box: str.
@@ -1398,6 +1477,7 @@ class AsyncParsingClient:
1398
1477
  "auto_mode_trigger_on_table_in_page": auto_mode_trigger_on_table_in_page,
1399
1478
  "auto_mode_trigger_on_text_in_page": auto_mode_trigger_on_text_in_page,
1400
1479
  "auto_mode_trigger_on_regexp_in_page": auto_mode_trigger_on_regexp_in_page,
1480
+ "auto_mode_configuration_json": auto_mode_configuration_json,
1401
1481
  "azure_openai_api_version": azure_openai_api_version,
1402
1482
  "azure_openai_deployment_name": azure_openai_deployment_name,
1403
1483
  "azure_openai_endpoint": azure_openai_endpoint,
@@ -1443,6 +1523,9 @@ class AsyncParsingClient:
1443
1523
  "model": model,
1444
1524
  "webhook_url": webhook_url,
1445
1525
  "preset": preset,
1526
+ "page_error_tolerance": page_error_tolerance,
1527
+ "replace_failed_page_with_error_message_prefix": replace_failed_page_with_error_message_prefix,
1528
+ "replace_failed_page_with_error_message_suffix": replace_failed_page_with_error_message_suffix,
1446
1529
  "system_prompt": system_prompt,
1447
1530
  "system_prompt_append": system_prompt_append,
1448
1531
  "user_prompt": user_prompt,
@@ -1452,8 +1535,10 @@ class AsyncParsingClient:
1452
1535
  "strict_mode_image_ocr": strict_mode_image_ocr,
1453
1536
  "strict_mode_reconstruction": strict_mode_reconstruction,
1454
1537
  "strict_mode_buggy_font": strict_mode_buggy_font,
1538
+ "save_images": save_images,
1455
1539
  "ignore_document_elements_for_layout_detection": ignore_document_elements_for_layout_detection,
1456
1540
  "output_tables_as_HTML": output_tables_as_html,
1541
+ "markdown_table_multiline_header_separator": markdown_table_multiline_header_separator,
1457
1542
  "use_vendor_multimodal_model": use_vendor_multimodal_model,
1458
1543
  "bounding_box": bounding_box,
1459
1544
  "gpt4o_mode": gpt_4_o_mode,
@@ -1473,6 +1558,8 @@ class AsyncParsingClient:
1473
1558
  _request["max_pages"] = max_pages
1474
1559
  if parse_mode is not OMIT:
1475
1560
  _request["parse_mode"] = parse_mode
1561
+ if replace_failed_page_mode is not OMIT:
1562
+ _request["replace_failed_page_mode"] = replace_failed_page_mode
1476
1563
  _response = await self._client_wrapper.httpx_client.request(
1477
1564
  "POST",
1478
1565
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/upload"),
@@ -1523,6 +1610,38 @@ class AsyncParsingClient:
1523
1610
  raise ApiError(status_code=_response.status_code, body=_response.text)
1524
1611
  raise ApiError(status_code=_response.status_code, body=_response_json)
1525
1612
 
1613
+ async def get_job_parameters(self, job_id: str) -> typing.Any:
1614
+ """
1615
+ Get a job by id
1616
+
1617
+ Parameters:
1618
+ - job_id: str.
1619
+ ---
1620
+ from llama_cloud.client import AsyncLlamaCloud
1621
+
1622
+ client = AsyncLlamaCloud(
1623
+ token="YOUR_TOKEN",
1624
+ )
1625
+ await client.parsing.get_job_parameters(
1626
+ job_id="string",
1627
+ )
1628
+ """
1629
+ _response = await self._client_wrapper.httpx_client.request(
1630
+ "GET",
1631
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/parameters"),
1632
+ headers=self._client_wrapper.get_headers(),
1633
+ timeout=60,
1634
+ )
1635
+ if 200 <= _response.status_code < 300:
1636
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
1637
+ if _response.status_code == 422:
1638
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
1639
+ try:
1640
+ _response_json = _response.json()
1641
+ except JSONDecodeError:
1642
+ raise ApiError(status_code=_response.status_code, body=_response.text)
1643
+ raise ApiError(status_code=_response.status_code, body=_response_json)
1644
+
1526
1645
  async def get_parsing_job_details(self, job_id: str) -> typing.Any:
1527
1646
  """
1528
1647
  Get a job by id
@@ -12,9 +12,9 @@ from ...errors.unprocessable_entity_error import UnprocessableEntityError
12
12
  from ...types.chat_data import ChatData
13
13
  from ...types.cloud_document import CloudDocument
14
14
  from ...types.cloud_document_create import CloudDocumentCreate
15
- from ...types.configured_transformation_item import ConfiguredTransformationItem
16
15
  from ...types.data_sink_create import DataSinkCreate
17
16
  from ...types.eval_execution_params import EvalExecutionParams
17
+ from ...types.file_count_by_status_response import FileCountByStatusResponse
18
18
  from ...types.http_validation_error import HttpValidationError
19
19
  from ...types.input_message import InputMessage
20
20
  from ...types.llama_parse_parameters import LlamaParseParameters
@@ -29,6 +29,7 @@ from ...types.pipeline_data_source_create import PipelineDataSourceCreate
29
29
  from ...types.pipeline_deployment import PipelineDeployment
30
30
  from ...types.pipeline_file import PipelineFile
31
31
  from ...types.pipeline_file_create import PipelineFileCreate
32
+ from ...types.pipeline_metadata_config import PipelineMetadataConfig
32
33
  from ...types.pipeline_type import PipelineType
33
34
  from ...types.playground_session import PlaygroundSession
34
35
  from ...types.preset_retrieval_params import PresetRetrievalParams
@@ -209,13 +210,14 @@ class PipelinesClient:
209
210
  *,
210
211
  embedding_config: typing.Optional[PipelineUpdateEmbeddingConfig] = OMIT,
211
212
  transform_config: typing.Optional[PipelineUpdateTransformConfig] = OMIT,
212
- configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]] = OMIT,
213
213
  data_sink_id: typing.Optional[str] = OMIT,
214
214
  embedding_model_config_id: typing.Optional[str] = OMIT,
215
215
  data_sink: typing.Optional[DataSinkCreate] = OMIT,
216
216
  preset_retrieval_parameters: typing.Optional[PresetRetrievalParams] = OMIT,
217
217
  eval_parameters: typing.Optional[EvalExecutionParams] = OMIT,
218
218
  llama_parse_parameters: typing.Optional[LlamaParseParameters] = OMIT,
219
+ status: typing.Optional[str] = OMIT,
220
+ metadata_config: typing.Optional[PipelineMetadataConfig] = OMIT,
219
221
  name: typing.Optional[str] = OMIT,
220
222
  managed_pipeline_id: typing.Optional[str] = OMIT,
221
223
  ) -> Pipeline:
@@ -229,8 +231,6 @@ class PipelinesClient:
229
231
 
230
232
  - transform_config: typing.Optional[PipelineUpdateTransformConfig]. Configuration for the transformation.
231
233
 
232
- - configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]].
233
-
234
234
  - data_sink_id: typing.Optional[str].
235
235
 
236
236
  - embedding_model_config_id: typing.Optional[str].
@@ -243,6 +243,10 @@ class PipelinesClient:
243
243
 
244
244
  - llama_parse_parameters: typing.Optional[LlamaParseParameters].
245
245
 
246
+ - status: typing.Optional[str].
247
+
248
+ - metadata_config: typing.Optional[PipelineMetadataConfig].
249
+
246
250
  - name: typing.Optional[str].
247
251
 
248
252
  - managed_pipeline_id: typing.Optional[str].
@@ -252,8 +256,6 @@ class PipelinesClient:
252
256
  _request["embedding_config"] = embedding_config
253
257
  if transform_config is not OMIT:
254
258
  _request["transform_config"] = transform_config
255
- if configured_transformations is not OMIT:
256
- _request["configured_transformations"] = configured_transformations
257
259
  if data_sink_id is not OMIT:
258
260
  _request["data_sink_id"] = data_sink_id
259
261
  if embedding_model_config_id is not OMIT:
@@ -266,6 +268,10 @@ class PipelinesClient:
266
268
  _request["eval_parameters"] = eval_parameters
267
269
  if llama_parse_parameters is not OMIT:
268
270
  _request["llama_parse_parameters"] = llama_parse_parameters
271
+ if status is not OMIT:
272
+ _request["status"] = status
273
+ if metadata_config is not OMIT:
274
+ _request["metadata_config"] = metadata_config
269
275
  if name is not OMIT:
270
276
  _request["name"] = name
271
277
  if managed_pipeline_id is not OMIT:
@@ -559,6 +565,53 @@ class PipelinesClient:
559
565
  raise ApiError(status_code=_response.status_code, body=_response.text)
560
566
  raise ApiError(status_code=_response.status_code, body=_response_json)
561
567
 
568
+ def get_pipeline_file_status_counts(
569
+ self,
570
+ pipeline_id: str,
571
+ *,
572
+ data_source_id: typing.Optional[str] = None,
573
+ only_manually_uploaded: typing.Optional[bool] = None,
574
+ ) -> FileCountByStatusResponse:
575
+ """
576
+ Get files for a pipeline.
577
+
578
+ Parameters:
579
+ - pipeline_id: str.
580
+
581
+ - data_source_id: typing.Optional[str].
582
+
583
+ - only_manually_uploaded: typing.Optional[bool].
584
+ ---
585
+ from llama_cloud.client import LlamaCloud
586
+
587
+ client = LlamaCloud(
588
+ token="YOUR_TOKEN",
589
+ )
590
+ client.pipelines.get_pipeline_file_status_counts(
591
+ pipeline_id="string",
592
+ )
593
+ """
594
+ _response = self._client_wrapper.httpx_client.request(
595
+ "GET",
596
+ urllib.parse.urljoin(
597
+ f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/files/status-counts"
598
+ ),
599
+ params=remove_none_from_dict(
600
+ {"data_source_id": data_source_id, "only_manually_uploaded": only_manually_uploaded}
601
+ ),
602
+ headers=self._client_wrapper.get_headers(),
603
+ timeout=60,
604
+ )
605
+ if 200 <= _response.status_code < 300:
606
+ return pydantic.parse_obj_as(FileCountByStatusResponse, _response.json()) # type: ignore
607
+ if _response.status_code == 422:
608
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
609
+ try:
610
+ _response_json = _response.json()
611
+ except JSONDecodeError:
612
+ raise ApiError(status_code=_response.status_code, body=_response.text)
613
+ raise ApiError(status_code=_response.status_code, body=_response_json)
614
+
562
615
  def get_pipeline_file_status(self, file_id: str, pipeline_id: str) -> ManagedIngestionStatusResponse:
563
616
  """
564
617
  Get status of a file for a pipeline.
@@ -1764,13 +1817,14 @@ class AsyncPipelinesClient:
1764
1817
  *,
1765
1818
  embedding_config: typing.Optional[PipelineUpdateEmbeddingConfig] = OMIT,
1766
1819
  transform_config: typing.Optional[PipelineUpdateTransformConfig] = OMIT,
1767
- configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]] = OMIT,
1768
1820
  data_sink_id: typing.Optional[str] = OMIT,
1769
1821
  embedding_model_config_id: typing.Optional[str] = OMIT,
1770
1822
  data_sink: typing.Optional[DataSinkCreate] = OMIT,
1771
1823
  preset_retrieval_parameters: typing.Optional[PresetRetrievalParams] = OMIT,
1772
1824
  eval_parameters: typing.Optional[EvalExecutionParams] = OMIT,
1773
1825
  llama_parse_parameters: typing.Optional[LlamaParseParameters] = OMIT,
1826
+ status: typing.Optional[str] = OMIT,
1827
+ metadata_config: typing.Optional[PipelineMetadataConfig] = OMIT,
1774
1828
  name: typing.Optional[str] = OMIT,
1775
1829
  managed_pipeline_id: typing.Optional[str] = OMIT,
1776
1830
  ) -> Pipeline:
@@ -1784,8 +1838,6 @@ class AsyncPipelinesClient:
1784
1838
 
1785
1839
  - transform_config: typing.Optional[PipelineUpdateTransformConfig]. Configuration for the transformation.
1786
1840
 
1787
- - configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]].
1788
-
1789
1841
  - data_sink_id: typing.Optional[str].
1790
1842
 
1791
1843
  - embedding_model_config_id: typing.Optional[str].
@@ -1798,6 +1850,10 @@ class AsyncPipelinesClient:
1798
1850
 
1799
1851
  - llama_parse_parameters: typing.Optional[LlamaParseParameters].
1800
1852
 
1853
+ - status: typing.Optional[str].
1854
+
1855
+ - metadata_config: typing.Optional[PipelineMetadataConfig].
1856
+
1801
1857
  - name: typing.Optional[str].
1802
1858
 
1803
1859
  - managed_pipeline_id: typing.Optional[str].
@@ -1807,8 +1863,6 @@ class AsyncPipelinesClient:
1807
1863
  _request["embedding_config"] = embedding_config
1808
1864
  if transform_config is not OMIT:
1809
1865
  _request["transform_config"] = transform_config
1810
- if configured_transformations is not OMIT:
1811
- _request["configured_transformations"] = configured_transformations
1812
1866
  if data_sink_id is not OMIT:
1813
1867
  _request["data_sink_id"] = data_sink_id
1814
1868
  if embedding_model_config_id is not OMIT:
@@ -1821,6 +1875,10 @@ class AsyncPipelinesClient:
1821
1875
  _request["eval_parameters"] = eval_parameters
1822
1876
  if llama_parse_parameters is not OMIT:
1823
1877
  _request["llama_parse_parameters"] = llama_parse_parameters
1878
+ if status is not OMIT:
1879
+ _request["status"] = status
1880
+ if metadata_config is not OMIT:
1881
+ _request["metadata_config"] = metadata_config
1824
1882
  if name is not OMIT:
1825
1883
  _request["name"] = name
1826
1884
  if managed_pipeline_id is not OMIT:
@@ -2114,6 +2172,53 @@ class AsyncPipelinesClient:
2114
2172
  raise ApiError(status_code=_response.status_code, body=_response.text)
2115
2173
  raise ApiError(status_code=_response.status_code, body=_response_json)
2116
2174
 
2175
+ async def get_pipeline_file_status_counts(
2176
+ self,
2177
+ pipeline_id: str,
2178
+ *,
2179
+ data_source_id: typing.Optional[str] = None,
2180
+ only_manually_uploaded: typing.Optional[bool] = None,
2181
+ ) -> FileCountByStatusResponse:
2182
+ """
2183
+ Get files for a pipeline.
2184
+
2185
+ Parameters:
2186
+ - pipeline_id: str.
2187
+
2188
+ - data_source_id: typing.Optional[str].
2189
+
2190
+ - only_manually_uploaded: typing.Optional[bool].
2191
+ ---
2192
+ from llama_cloud.client import AsyncLlamaCloud
2193
+
2194
+ client = AsyncLlamaCloud(
2195
+ token="YOUR_TOKEN",
2196
+ )
2197
+ await client.pipelines.get_pipeline_file_status_counts(
2198
+ pipeline_id="string",
2199
+ )
2200
+ """
2201
+ _response = await self._client_wrapper.httpx_client.request(
2202
+ "GET",
2203
+ urllib.parse.urljoin(
2204
+ f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/files/status-counts"
2205
+ ),
2206
+ params=remove_none_from_dict(
2207
+ {"data_source_id": data_source_id, "only_manually_uploaded": only_manually_uploaded}
2208
+ ),
2209
+ headers=self._client_wrapper.get_headers(),
2210
+ timeout=60,
2211
+ )
2212
+ if 200 <= _response.status_code < 300:
2213
+ return pydantic.parse_obj_as(FileCountByStatusResponse, _response.json()) # type: ignore
2214
+ if _response.status_code == 422:
2215
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
2216
+ try:
2217
+ _response_json = _response.json()
2218
+ except JSONDecodeError:
2219
+ raise ApiError(status_code=_response.status_code, body=_response.text)
2220
+ raise ApiError(status_code=_response.status_code, body=_response_json)
2221
+
2117
2222
  async def get_pipeline_file_status(self, file_id: str, pipeline_id: str) -> ManagedIngestionStatusResponse:
2118
2223
  """
2119
2224
  Get status of a file for a pipeline.