llama-cloud 0.1.20__py3-none-any.whl → 0.1.22__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 (55) hide show
  1. llama_cloud/__init__.py +18 -136
  2. llama_cloud/client.py +3 -3
  3. llama_cloud/resources/__init__.py +4 -43
  4. llama_cloud/resources/admin/client.py +78 -0
  5. llama_cloud/resources/data_sinks/__init__.py +2 -18
  6. llama_cloud/resources/data_sinks/client.py +94 -2
  7. llama_cloud/resources/data_sinks/types/__init__.py +2 -18
  8. llama_cloud/resources/data_sinks/types/data_sink_update_component.py +7 -65
  9. llama_cloud/resources/data_sources/__init__.py +2 -30
  10. llama_cloud/resources/data_sources/types/__init__.py +1 -28
  11. llama_cloud/resources/data_sources/types/data_source_update_component.py +23 -2
  12. llama_cloud/resources/jobs/client.py +10 -2
  13. llama_cloud/resources/llama_extract/client.py +50 -6
  14. llama_cloud/resources/organizations/client.py +12 -2
  15. llama_cloud/resources/parsing/client.py +30 -0
  16. llama_cloud/resources/pipelines/client.py +22 -0
  17. llama_cloud/resources/retrievers/client.py +14 -0
  18. llama_cloud/types/__init__.py +18 -112
  19. llama_cloud/types/cloud_jira_data_source.py +4 -0
  20. llama_cloud/types/cloud_s_3_data_source.py +1 -0
  21. llama_cloud/types/data_sink_component.py +7 -65
  22. llama_cloud/types/data_sink_create_component.py +7 -65
  23. llama_cloud/types/data_source_component.py +23 -2
  24. llama_cloud/types/data_source_create_component.py +23 -2
  25. llama_cloud/types/{data_sink_definition.py → document_block.py} +6 -15
  26. llama_cloud/types/document_chunk_mode.py +17 -0
  27. llama_cloud/types/extract_config.py +7 -0
  28. llama_cloud/types/extract_mode.py +4 -0
  29. llama_cloud/types/extract_models.py +33 -0
  30. llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +11 -0
  31. llama_cloud/types/{data_source_definition.py → llm_config_result.py} +6 -15
  32. llama_cloud/types/llm_config_result_llm_type.py +33 -0
  33. llama_cloud/types/llm_configs_response.py +33 -0
  34. llama_cloud/types/pipeline.py +2 -0
  35. llama_cloud/types/pipeline_create.py +1 -3
  36. llama_cloud/types/pipeline_data_source_component.py +23 -2
  37. llama_cloud/types/pipeline_status.py +17 -0
  38. llama_cloud/types/prompt_conf.py +1 -0
  39. llama_cloud/types/struct_parse_conf.py +2 -1
  40. llama_cloud/types/supported_llm_model.py +1 -2
  41. llama_cloud/types/supported_llm_model_names.py +4 -4
  42. llama_cloud/types/user_organization_role.py +1 -0
  43. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/METADATA +5 -3
  44. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/RECORD +47 -49
  45. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/WHEEL +1 -1
  46. llama_cloud/resources/component_definitions/client.py +0 -189
  47. llama_cloud/resources/data_sources/types/data_source_update_component_one.py +0 -122
  48. llama_cloud/types/configurable_transformation_definition.py +0 -48
  49. llama_cloud/types/configurable_transformation_names.py +0 -41
  50. llama_cloud/types/data_source_component_one.py +0 -122
  51. llama_cloud/types/data_source_create_component_one.py +0 -122
  52. llama_cloud/types/pipeline_data_source_component_one.py +0 -122
  53. llama_cloud/types/transformation_category_names.py +0 -17
  54. /llama_cloud/resources/{component_definitions → admin}/__init__.py +0 -0
  55. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/LICENSE +0 -0
@@ -1,11 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from __future__ import annotations
4
-
5
3
  import typing
6
4
 
7
- import typing_extensions
8
-
9
5
  from ....types.cloud_azure_ai_search_vector_store import CloudAzureAiSearchVectorStore
10
6
  from ....types.cloud_milvus_vector_store import CloudMilvusVectorStore
11
7
  from ....types.cloud_mongo_db_atlas_vector_search import CloudMongoDbAtlasVectorSearch
@@ -13,66 +9,12 @@ from ....types.cloud_pinecone_vector_store import CloudPineconeVectorStore
13
9
  from ....types.cloud_postgres_vector_store import CloudPostgresVectorStore
14
10
  from ....types.cloud_qdrant_vector_store import CloudQdrantVectorStore
15
11
 
16
-
17
- class DataSinkUpdateComponent_AzureAiSearch(CloudAzureAiSearchVectorStore):
18
- type: typing_extensions.Literal["azure_ai_search"]
19
-
20
- class Config:
21
- frozen = True
22
- smart_union = True
23
- allow_population_by_field_name = True
24
-
25
-
26
- class DataSinkUpdateComponent_Milvus(CloudMilvusVectorStore):
27
- type: typing_extensions.Literal["milvus"]
28
-
29
- class Config:
30
- frozen = True
31
- smart_union = True
32
- allow_population_by_field_name = True
33
-
34
-
35
- class DataSinkUpdateComponent_MongodbAtlas(CloudMongoDbAtlasVectorSearch):
36
- type: typing_extensions.Literal["mongodb_atlas"]
37
-
38
- class Config:
39
- frozen = True
40
- smart_union = True
41
- allow_population_by_field_name = True
42
-
43
-
44
- class DataSinkUpdateComponent_Pinecone(CloudPineconeVectorStore):
45
- type: typing_extensions.Literal["pinecone"]
46
-
47
- class Config:
48
- frozen = True
49
- smart_union = True
50
- allow_population_by_field_name = True
51
-
52
-
53
- class DataSinkUpdateComponent_Postgres(CloudPostgresVectorStore):
54
- type: typing_extensions.Literal["postgres"]
55
-
56
- class Config:
57
- frozen = True
58
- smart_union = True
59
- allow_population_by_field_name = True
60
-
61
-
62
- class DataSinkUpdateComponent_Qdrant(CloudQdrantVectorStore):
63
- type: typing_extensions.Literal["qdrant"]
64
-
65
- class Config:
66
- frozen = True
67
- smart_union = True
68
- allow_population_by_field_name = True
69
-
70
-
71
12
  DataSinkUpdateComponent = typing.Union[
72
- DataSinkUpdateComponent_AzureAiSearch,
73
- DataSinkUpdateComponent_Milvus,
74
- DataSinkUpdateComponent_MongodbAtlas,
75
- DataSinkUpdateComponent_Pinecone,
76
- DataSinkUpdateComponent_Postgres,
77
- DataSinkUpdateComponent_Qdrant,
13
+ typing.Dict[str, typing.Any],
14
+ CloudPineconeVectorStore,
15
+ CloudPostgresVectorStore,
16
+ CloudQdrantVectorStore,
17
+ CloudAzureAiSearchVectorStore,
18
+ CloudMongoDbAtlasVectorSearch,
19
+ CloudMilvusVectorStore,
78
20
  ]
@@ -1,33 +1,5 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .types import (
4
- DataSourceUpdateComponent,
5
- DataSourceUpdateComponentOne,
6
- DataSourceUpdateComponentOne_AzureStorageBlob,
7
- DataSourceUpdateComponentOne_Box,
8
- DataSourceUpdateComponentOne_Confluence,
9
- DataSourceUpdateComponentOne_GoogleDrive,
10
- DataSourceUpdateComponentOne_Jira,
11
- DataSourceUpdateComponentOne_MicrosoftOnedrive,
12
- DataSourceUpdateComponentOne_MicrosoftSharepoint,
13
- DataSourceUpdateComponentOne_NotionPage,
14
- DataSourceUpdateComponentOne_S3,
15
- DataSourceUpdateComponentOne_Slack,
16
- DataSourceUpdateCustomMetadataValue,
17
- )
3
+ from .types import DataSourceUpdateComponent, DataSourceUpdateCustomMetadataValue
18
4
 
19
- __all__ = [
20
- "DataSourceUpdateComponent",
21
- "DataSourceUpdateComponentOne",
22
- "DataSourceUpdateComponentOne_AzureStorageBlob",
23
- "DataSourceUpdateComponentOne_Box",
24
- "DataSourceUpdateComponentOne_Confluence",
25
- "DataSourceUpdateComponentOne_GoogleDrive",
26
- "DataSourceUpdateComponentOne_Jira",
27
- "DataSourceUpdateComponentOne_MicrosoftOnedrive",
28
- "DataSourceUpdateComponentOne_MicrosoftSharepoint",
29
- "DataSourceUpdateComponentOne_NotionPage",
30
- "DataSourceUpdateComponentOne_S3",
31
- "DataSourceUpdateComponentOne_Slack",
32
- "DataSourceUpdateCustomMetadataValue",
33
- ]
5
+ __all__ = ["DataSourceUpdateComponent", "DataSourceUpdateCustomMetadataValue"]
@@ -1,33 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .data_source_update_component import DataSourceUpdateComponent
4
- from .data_source_update_component_one import (
5
- DataSourceUpdateComponentOne,
6
- DataSourceUpdateComponentOne_AzureStorageBlob,
7
- DataSourceUpdateComponentOne_Box,
8
- DataSourceUpdateComponentOne_Confluence,
9
- DataSourceUpdateComponentOne_GoogleDrive,
10
- DataSourceUpdateComponentOne_Jira,
11
- DataSourceUpdateComponentOne_MicrosoftOnedrive,
12
- DataSourceUpdateComponentOne_MicrosoftSharepoint,
13
- DataSourceUpdateComponentOne_NotionPage,
14
- DataSourceUpdateComponentOne_S3,
15
- DataSourceUpdateComponentOne_Slack,
16
- )
17
4
  from .data_source_update_custom_metadata_value import DataSourceUpdateCustomMetadataValue
18
5
 
19
- __all__ = [
20
- "DataSourceUpdateComponent",
21
- "DataSourceUpdateComponentOne",
22
- "DataSourceUpdateComponentOne_AzureStorageBlob",
23
- "DataSourceUpdateComponentOne_Box",
24
- "DataSourceUpdateComponentOne_Confluence",
25
- "DataSourceUpdateComponentOne_GoogleDrive",
26
- "DataSourceUpdateComponentOne_Jira",
27
- "DataSourceUpdateComponentOne_MicrosoftOnedrive",
28
- "DataSourceUpdateComponentOne_MicrosoftSharepoint",
29
- "DataSourceUpdateComponentOne_NotionPage",
30
- "DataSourceUpdateComponentOne_S3",
31
- "DataSourceUpdateComponentOne_Slack",
32
- "DataSourceUpdateCustomMetadataValue",
33
- ]
6
+ __all__ = ["DataSourceUpdateComponent", "DataSourceUpdateCustomMetadataValue"]
@@ -2,6 +2,27 @@
2
2
 
3
3
  import typing
4
4
 
5
- from .data_source_update_component_one import DataSourceUpdateComponentOne
5
+ from ....types.cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
6
+ from ....types.cloud_box_data_source import CloudBoxDataSource
7
+ from ....types.cloud_confluence_data_source import CloudConfluenceDataSource
8
+ from ....types.cloud_google_drive_data_source import CloudGoogleDriveDataSource
9
+ from ....types.cloud_jira_data_source import CloudJiraDataSource
10
+ from ....types.cloud_notion_page_data_source import CloudNotionPageDataSource
11
+ from ....types.cloud_one_drive_data_source import CloudOneDriveDataSource
12
+ from ....types.cloud_s_3_data_source import CloudS3DataSource
13
+ from ....types.cloud_sharepoint_data_source import CloudSharepointDataSource
14
+ from ....types.cloud_slack_data_source import CloudSlackDataSource
6
15
 
7
- DataSourceUpdateComponent = typing.Union[typing.Dict[str, typing.Any], DataSourceUpdateComponentOne]
16
+ DataSourceUpdateComponent = typing.Union[
17
+ typing.Dict[str, typing.Any],
18
+ CloudS3DataSource,
19
+ CloudAzStorageBlobDataSource,
20
+ CloudGoogleDriveDataSource,
21
+ CloudOneDriveDataSource,
22
+ CloudSharepointDataSource,
23
+ CloudSlackDataSource,
24
+ CloudNotionPageDataSource,
25
+ CloudConfluenceDataSource,
26
+ CloudJiraDataSource,
27
+ CloudBoxDataSource,
28
+ ]
@@ -37,6 +37,10 @@ class JobsClient:
37
37
  """
38
38
  Get jobs for a project.
39
39
 
40
+ Note:
41
+ The include_usage_metrics parameter is deprecated and will be removed in a future version.
42
+ We've moved to usage v2 and this parameter will no longer return meaningful data.
43
+
40
44
  Parameters:
41
45
  - job_name: typing.Optional[str].
42
46
 
@@ -44,7 +48,7 @@ class JobsClient:
44
48
 
45
49
  - offset: typing.Optional[int].
46
50
 
47
- - include_usage_metrics: typing.Optional[bool].
51
+ - include_usage_metrics: typing.Optional[bool]. Deprecated: This parameter is no longer supported as we've moved to usage v2. It will be removed in a future version.
48
52
 
49
53
  - project_id: typing.Optional[str].
50
54
 
@@ -101,6 +105,10 @@ class AsyncJobsClient:
101
105
  """
102
106
  Get jobs for a project.
103
107
 
108
+ Note:
109
+ The include_usage_metrics parameter is deprecated and will be removed in a future version.
110
+ We've moved to usage v2 and this parameter will no longer return meaningful data.
111
+
104
112
  Parameters:
105
113
  - job_name: typing.Optional[str].
106
114
 
@@ -108,7 +116,7 @@ class AsyncJobsClient:
108
116
 
109
117
  - offset: typing.Optional[int].
110
118
 
111
- - include_usage_metrics: typing.Optional[bool].
119
+ - include_usage_metrics: typing.Optional[bool]. Deprecated: This parameter is no longer supported as we've moved to usage v2. It will be removed in a future version.
112
120
 
113
121
  - project_id: typing.Optional[str].
114
122
 
@@ -92,7 +92,12 @@ class LlamaExtractClient:
92
92
 
93
93
  - config: ExtractConfig. The configuration parameters for the extraction agent.
94
94
  ---
95
- from llama_cloud import ExtractConfig, ExtractMode, ExtractTarget
95
+ from llama_cloud import (
96
+ DocumentChunkMode,
97
+ ExtractConfig,
98
+ ExtractMode,
99
+ ExtractTarget,
100
+ )
96
101
  from llama_cloud.client import LlamaCloud
97
102
 
98
103
  client = LlamaCloud(
@@ -103,6 +108,7 @@ class LlamaExtractClient:
103
108
  config=ExtractConfig(
104
109
  extraction_target=ExtractTarget.PER_DOC,
105
110
  extraction_mode=ExtractMode.FAST,
111
+ chunk_mode=DocumentChunkMode.PAGE,
106
112
  ),
107
113
  )
108
114
  """
@@ -238,7 +244,12 @@ class LlamaExtractClient:
238
244
 
239
245
  - config: ExtractConfig. The configuration parameters for the extraction agent.
240
246
  ---
241
- from llama_cloud import ExtractConfig, ExtractMode, ExtractTarget
247
+ from llama_cloud import (
248
+ DocumentChunkMode,
249
+ ExtractConfig,
250
+ ExtractMode,
251
+ ExtractTarget,
252
+ )
242
253
  from llama_cloud.client import LlamaCloud
243
254
 
244
255
  client = LlamaCloud(
@@ -249,6 +260,7 @@ class LlamaExtractClient:
249
260
  config=ExtractConfig(
250
261
  extraction_target=ExtractTarget.PER_DOC,
251
262
  extraction_mode=ExtractMode.FAST,
263
+ chunk_mode=DocumentChunkMode.PAGE,
252
264
  ),
253
265
  )
254
266
  """
@@ -342,6 +354,7 @@ class LlamaExtractClient:
342
354
  - request: ExtractJobCreate.
343
355
  ---
344
356
  from llama_cloud import (
357
+ DocumentChunkMode,
345
358
  ExtractConfig,
346
359
  ExtractJobCreate,
347
360
  ExtractMode,
@@ -359,6 +372,7 @@ class LlamaExtractClient:
359
372
  config_override=ExtractConfig(
360
373
  extraction_target=ExtractTarget.PER_DOC,
361
374
  extraction_mode=ExtractMode.FAST,
375
+ chunk_mode=DocumentChunkMode.PAGE,
362
376
  ),
363
377
  ),
364
378
  )
@@ -428,6 +442,7 @@ class LlamaExtractClient:
428
442
  ---
429
443
  from llama_cloud import (
430
444
  ChunkMode,
445
+ DocumentChunkMode,
431
446
  ExtractConfig,
432
447
  ExtractJobCreate,
433
448
  ExtractMode,
@@ -449,6 +464,7 @@ class LlamaExtractClient:
449
464
  config_override=ExtractConfig(
450
465
  extraction_target=ExtractTarget.PER_DOC,
451
466
  extraction_mode=ExtractMode.FAST,
467
+ chunk_mode=DocumentChunkMode.PAGE,
452
468
  ),
453
469
  ),
454
470
  extract_settings=LlamaExtractSettings(
@@ -548,7 +564,12 @@ class LlamaExtractClient:
548
564
 
549
565
  - config_override: typing.Optional[ExtractConfig].
550
566
  ---
551
- from llama_cloud import ExtractConfig, ExtractMode, ExtractTarget
567
+ from llama_cloud import (
568
+ DocumentChunkMode,
569
+ ExtractConfig,
570
+ ExtractMode,
571
+ ExtractTarget,
572
+ )
552
573
  from llama_cloud.client import LlamaCloud
553
574
 
554
575
  client = LlamaCloud(
@@ -560,6 +581,7 @@ class LlamaExtractClient:
560
581
  config_override=ExtractConfig(
561
582
  extraction_target=ExtractTarget.PER_DOC,
562
583
  extraction_mode=ExtractMode.FAST,
584
+ chunk_mode=DocumentChunkMode.PAGE,
563
585
  ),
564
586
  )
565
587
  """
@@ -831,7 +853,12 @@ class AsyncLlamaExtractClient:
831
853
 
832
854
  - config: ExtractConfig. The configuration parameters for the extraction agent.
833
855
  ---
834
- from llama_cloud import ExtractConfig, ExtractMode, ExtractTarget
856
+ from llama_cloud import (
857
+ DocumentChunkMode,
858
+ ExtractConfig,
859
+ ExtractMode,
860
+ ExtractTarget,
861
+ )
835
862
  from llama_cloud.client import AsyncLlamaCloud
836
863
 
837
864
  client = AsyncLlamaCloud(
@@ -842,6 +869,7 @@ class AsyncLlamaExtractClient:
842
869
  config=ExtractConfig(
843
870
  extraction_target=ExtractTarget.PER_DOC,
844
871
  extraction_mode=ExtractMode.FAST,
872
+ chunk_mode=DocumentChunkMode.PAGE,
845
873
  ),
846
874
  )
847
875
  """
@@ -977,7 +1005,12 @@ class AsyncLlamaExtractClient:
977
1005
 
978
1006
  - config: ExtractConfig. The configuration parameters for the extraction agent.
979
1007
  ---
980
- from llama_cloud import ExtractConfig, ExtractMode, ExtractTarget
1008
+ from llama_cloud import (
1009
+ DocumentChunkMode,
1010
+ ExtractConfig,
1011
+ ExtractMode,
1012
+ ExtractTarget,
1013
+ )
981
1014
  from llama_cloud.client import AsyncLlamaCloud
982
1015
 
983
1016
  client = AsyncLlamaCloud(
@@ -988,6 +1021,7 @@ class AsyncLlamaExtractClient:
988
1021
  config=ExtractConfig(
989
1022
  extraction_target=ExtractTarget.PER_DOC,
990
1023
  extraction_mode=ExtractMode.FAST,
1024
+ chunk_mode=DocumentChunkMode.PAGE,
991
1025
  ),
992
1026
  )
993
1027
  """
@@ -1081,6 +1115,7 @@ class AsyncLlamaExtractClient:
1081
1115
  - request: ExtractJobCreate.
1082
1116
  ---
1083
1117
  from llama_cloud import (
1118
+ DocumentChunkMode,
1084
1119
  ExtractConfig,
1085
1120
  ExtractJobCreate,
1086
1121
  ExtractMode,
@@ -1098,6 +1133,7 @@ class AsyncLlamaExtractClient:
1098
1133
  config_override=ExtractConfig(
1099
1134
  extraction_target=ExtractTarget.PER_DOC,
1100
1135
  extraction_mode=ExtractMode.FAST,
1136
+ chunk_mode=DocumentChunkMode.PAGE,
1101
1137
  ),
1102
1138
  ),
1103
1139
  )
@@ -1167,6 +1203,7 @@ class AsyncLlamaExtractClient:
1167
1203
  ---
1168
1204
  from llama_cloud import (
1169
1205
  ChunkMode,
1206
+ DocumentChunkMode,
1170
1207
  ExtractConfig,
1171
1208
  ExtractJobCreate,
1172
1209
  ExtractMode,
@@ -1188,6 +1225,7 @@ class AsyncLlamaExtractClient:
1188
1225
  config_override=ExtractConfig(
1189
1226
  extraction_target=ExtractTarget.PER_DOC,
1190
1227
  extraction_mode=ExtractMode.FAST,
1228
+ chunk_mode=DocumentChunkMode.PAGE,
1191
1229
  ),
1192
1230
  ),
1193
1231
  extract_settings=LlamaExtractSettings(
@@ -1287,7 +1325,12 @@ class AsyncLlamaExtractClient:
1287
1325
 
1288
1326
  - config_override: typing.Optional[ExtractConfig].
1289
1327
  ---
1290
- from llama_cloud import ExtractConfig, ExtractMode, ExtractTarget
1328
+ from llama_cloud import (
1329
+ DocumentChunkMode,
1330
+ ExtractConfig,
1331
+ ExtractMode,
1332
+ ExtractTarget,
1333
+ )
1291
1334
  from llama_cloud.client import AsyncLlamaCloud
1292
1335
 
1293
1336
  client = AsyncLlamaCloud(
@@ -1299,6 +1342,7 @@ class AsyncLlamaExtractClient:
1299
1342
  config_override=ExtractConfig(
1300
1343
  extraction_target=ExtractTarget.PER_DOC,
1301
1344
  extraction_mode=ExtractMode.FAST,
1345
+ chunk_mode=DocumentChunkMode.PAGE,
1302
1346
  ),
1303
1347
  )
1304
1348
  """
@@ -520,12 +520,16 @@ class OrganizationsClient:
520
520
  raise ApiError(status_code=_response.status_code, body=_response.text)
521
521
  raise ApiError(status_code=_response.status_code, body=_response_json)
522
522
 
523
- def get_user_role(self, organization_id: str) -> typing.Optional[UserOrganizationRole]:
523
+ def get_user_role(
524
+ self, organization_id: str, *, project_id: typing.Optional[str] = None
525
+ ) -> typing.Optional[UserOrganizationRole]:
524
526
  """
525
527
  Get the role of a user in an organization.
526
528
 
527
529
  Parameters:
528
530
  - organization_id: str.
531
+
532
+ - project_id: typing.Optional[str].
529
533
  ---
530
534
  from llama_cloud.client import LlamaCloud
531
535
 
@@ -541,6 +545,7 @@ class OrganizationsClient:
541
545
  urllib.parse.urljoin(
542
546
  f"{self._client_wrapper.get_base_url()}/", f"api/v1/organizations/{organization_id}/users/roles"
543
547
  ),
548
+ params=remove_none_from_dict({"project_id": project_id}),
544
549
  headers=self._client_wrapper.get_headers(),
545
550
  timeout=60,
546
551
  )
@@ -1216,12 +1221,16 @@ class AsyncOrganizationsClient:
1216
1221
  raise ApiError(status_code=_response.status_code, body=_response.text)
1217
1222
  raise ApiError(status_code=_response.status_code, body=_response_json)
1218
1223
 
1219
- async def get_user_role(self, organization_id: str) -> typing.Optional[UserOrganizationRole]:
1224
+ async def get_user_role(
1225
+ self, organization_id: str, *, project_id: typing.Optional[str] = None
1226
+ ) -> typing.Optional[UserOrganizationRole]:
1220
1227
  """
1221
1228
  Get the role of a user in an organization.
1222
1229
 
1223
1230
  Parameters:
1224
1231
  - organization_id: str.
1232
+
1233
+ - project_id: typing.Optional[str].
1225
1234
  ---
1226
1235
  from llama_cloud.client import AsyncLlamaCloud
1227
1236
 
@@ -1237,6 +1246,7 @@ class AsyncOrganizationsClient:
1237
1246
  urllib.parse.urljoin(
1238
1247
  f"{self._client_wrapper.get_base_url()}/", f"api/v1/organizations/{organization_id}/users/roles"
1239
1248
  ),
1249
+ params=remove_none_from_dict({"project_id": project_id}),
1240
1250
  headers=self._client_wrapper.get_headers(),
1241
1251
  timeout=60,
1242
1252
  )
@@ -667,6 +667,9 @@ class ParsingClient:
667
667
  """
668
668
  Get a job by id
669
669
 
670
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
671
+ and will be removed in a future release.
672
+
670
673
  Parameters:
671
674
  - job_id: str.
672
675
 
@@ -738,6 +741,9 @@ class ParsingClient:
738
741
  """
739
742
  Get a job by id
740
743
 
744
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
745
+ and will be removed in a future release.
746
+
741
747
  Parameters:
742
748
  - job_id: str.
743
749
 
@@ -843,6 +849,9 @@ class ParsingClient:
843
849
  """
844
850
  Get a job by id
845
851
 
852
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
853
+ and will be removed in a future release.
854
+
846
855
  Parameters:
847
856
  - job_id: str.
848
857
 
@@ -914,6 +923,9 @@ class ParsingClient:
914
923
  """
915
924
  Get a job by id
916
925
 
926
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
927
+ and will be removed in a future release.
928
+
917
929
  Parameters:
918
930
  - job_id: str.
919
931
 
@@ -983,6 +995,9 @@ class ParsingClient:
983
995
  """
984
996
  Get parsing history for user
985
997
 
998
+ This endpoint is deprecated.
999
+ Use /api/v1/jobs/?job_name=parsing&project_id=YOUR_PROJECT_ID instead.
1000
+
986
1001
  ---
987
1002
  from llama_cloud.client import LlamaCloud
988
1003
 
@@ -1680,6 +1695,9 @@ class AsyncParsingClient:
1680
1695
  """
1681
1696
  Get a job by id
1682
1697
 
1698
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
1699
+ and will be removed in a future release.
1700
+
1683
1701
  Parameters:
1684
1702
  - job_id: str.
1685
1703
 
@@ -1751,6 +1769,9 @@ class AsyncParsingClient:
1751
1769
  """
1752
1770
  Get a job by id
1753
1771
 
1772
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
1773
+ and will be removed in a future release.
1774
+
1754
1775
  Parameters:
1755
1776
  - job_id: str.
1756
1777
 
@@ -1858,6 +1879,9 @@ class AsyncParsingClient:
1858
1879
  """
1859
1880
  Get a job by id
1860
1881
 
1882
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
1883
+ and will be removed in a future release.
1884
+
1861
1885
  Parameters:
1862
1886
  - job_id: str.
1863
1887
 
@@ -1931,6 +1955,9 @@ class AsyncParsingClient:
1931
1955
  """
1932
1956
  Get a job by id
1933
1957
 
1958
+ Note: The 'credits_used' and 'job_credits_usage' fields in the response metadata are deprecated
1959
+ and will be removed in a future release.
1960
+
1934
1961
  Parameters:
1935
1962
  - job_id: str.
1936
1963
 
@@ -2000,6 +2027,9 @@ class AsyncParsingClient:
2000
2027
  """
2001
2028
  Get parsing history for user
2002
2029
 
2030
+ This endpoint is deprecated.
2031
+ Use /api/v1/jobs/?job_name=parsing&project_id=YOUR_PROJECT_ID instead.
2032
+
2003
2033
  ---
2004
2034
  from llama_cloud.client import AsyncLlamaCloud
2005
2035
 
@@ -517,6 +517,7 @@ class PipelinesClient:
517
517
  only_manually_uploaded: typing.Optional[bool] = None,
518
518
  limit: typing.Optional[int] = None,
519
519
  offset: typing.Optional[int] = None,
520
+ order_by: typing.Optional[str] = None,
520
521
  ) -> PaginatedListPipelineFilesResponse:
521
522
  """
522
523
  Get files for a pipeline.
@@ -531,6 +532,8 @@ class PipelinesClient:
531
532
  - limit: typing.Optional[int].
532
533
 
533
534
  - offset: typing.Optional[int].
535
+
536
+ - order_by: typing.Optional[str].
534
537
  ---
535
538
  from llama_cloud.client import LlamaCloud
536
539
 
@@ -550,6 +553,7 @@ class PipelinesClient:
550
553
  "only_manually_uploaded": only_manually_uploaded,
551
554
  "limit": limit,
552
555
  "offset": offset,
556
+ "order_by": order_by,
553
557
  }
554
558
  ),
555
559
  headers=self._client_wrapper.get_headers(),
@@ -1024,6 +1028,8 @@ class PipelinesClient:
1024
1028
  self,
1025
1029
  pipeline_id: str,
1026
1030
  *,
1031
+ project_id: typing.Optional[str] = None,
1032
+ organization_id: typing.Optional[str] = None,
1027
1033
  dense_similarity_top_k: typing.Optional[int] = OMIT,
1028
1034
  dense_similarity_cutoff: typing.Optional[float] = OMIT,
1029
1035
  sparse_similarity_top_k: typing.Optional[int] = OMIT,
@@ -1043,6 +1049,10 @@ class PipelinesClient:
1043
1049
  Parameters:
1044
1050
  - pipeline_id: str.
1045
1051
 
1052
+ - project_id: typing.Optional[str].
1053
+
1054
+ - organization_id: typing.Optional[str].
1055
+
1046
1056
  - dense_similarity_top_k: typing.Optional[int].
1047
1057
 
1048
1058
  - dense_similarity_cutoff: typing.Optional[float].
@@ -1109,6 +1119,7 @@ class PipelinesClient:
1109
1119
  _response = self._client_wrapper.httpx_client.request(
1110
1120
  "POST",
1111
1121
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/retrieve"),
1122
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
1112
1123
  json=jsonable_encoder(_request),
1113
1124
  headers=self._client_wrapper.get_headers(),
1114
1125
  timeout=60,
@@ -2124,6 +2135,7 @@ class AsyncPipelinesClient:
2124
2135
  only_manually_uploaded: typing.Optional[bool] = None,
2125
2136
  limit: typing.Optional[int] = None,
2126
2137
  offset: typing.Optional[int] = None,
2138
+ order_by: typing.Optional[str] = None,
2127
2139
  ) -> PaginatedListPipelineFilesResponse:
2128
2140
  """
2129
2141
  Get files for a pipeline.
@@ -2138,6 +2150,8 @@ class AsyncPipelinesClient:
2138
2150
  - limit: typing.Optional[int].
2139
2151
 
2140
2152
  - offset: typing.Optional[int].
2153
+
2154
+ - order_by: typing.Optional[str].
2141
2155
  ---
2142
2156
  from llama_cloud.client import AsyncLlamaCloud
2143
2157
 
@@ -2157,6 +2171,7 @@ class AsyncPipelinesClient:
2157
2171
  "only_manually_uploaded": only_manually_uploaded,
2158
2172
  "limit": limit,
2159
2173
  "offset": offset,
2174
+ "order_by": order_by,
2160
2175
  }
2161
2176
  ),
2162
2177
  headers=self._client_wrapper.get_headers(),
@@ -2633,6 +2648,8 @@ class AsyncPipelinesClient:
2633
2648
  self,
2634
2649
  pipeline_id: str,
2635
2650
  *,
2651
+ project_id: typing.Optional[str] = None,
2652
+ organization_id: typing.Optional[str] = None,
2636
2653
  dense_similarity_top_k: typing.Optional[int] = OMIT,
2637
2654
  dense_similarity_cutoff: typing.Optional[float] = OMIT,
2638
2655
  sparse_similarity_top_k: typing.Optional[int] = OMIT,
@@ -2652,6 +2669,10 @@ class AsyncPipelinesClient:
2652
2669
  Parameters:
2653
2670
  - pipeline_id: str.
2654
2671
 
2672
+ - project_id: typing.Optional[str].
2673
+
2674
+ - organization_id: typing.Optional[str].
2675
+
2655
2676
  - dense_similarity_top_k: typing.Optional[int].
2656
2677
 
2657
2678
  - dense_similarity_cutoff: typing.Optional[float].
@@ -2718,6 +2739,7 @@ class AsyncPipelinesClient:
2718
2739
  _response = await self._client_wrapper.httpx_client.request(
2719
2740
  "POST",
2720
2741
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/retrieve"),
2742
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
2721
2743
  json=jsonable_encoder(_request),
2722
2744
  headers=self._client_wrapper.get_headers(),
2723
2745
  timeout=60,