llama-cloud 0.1.34__py3-none-any.whl → 0.1.36__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 (60) hide show
  1. llama_cloud/__init__.py +54 -2
  2. llama_cloud/client.py +3 -0
  3. llama_cloud/resources/__init__.py +6 -0
  4. llama_cloud/resources/admin/client.py +51 -0
  5. llama_cloud/resources/beta/client.py +211 -8
  6. llama_cloud/resources/classifier/client.py +231 -181
  7. llama_cloud/resources/data_sinks/types/data_sink_update_component.py +2 -0
  8. llama_cloud/resources/files/client.py +226 -0
  9. llama_cloud/resources/llama_extract/__init__.py +4 -0
  10. llama_cloud/resources/llama_extract/client.py +275 -4
  11. llama_cloud/resources/llama_extract/types/__init__.py +4 -0
  12. llama_cloud/resources/llama_extract/types/extract_stateless_request_data_schema.py +9 -0
  13. llama_cloud/resources/llama_extract/types/extract_stateless_request_data_schema_zero_value.py +7 -0
  14. llama_cloud/resources/parsing/client.py +24 -0
  15. llama_cloud/resources/users/__init__.py +2 -0
  16. llama_cloud/resources/users/client.py +155 -0
  17. llama_cloud/types/__init__.py +48 -2
  18. llama_cloud/types/classification_result.py +4 -5
  19. llama_cloud/types/classifier_rule.py +43 -0
  20. llama_cloud/types/classify_job.py +45 -0
  21. llama_cloud/types/{classify_response.py → classify_job_results.py} +3 -6
  22. llama_cloud/types/classify_job_with_status.py +47 -0
  23. llama_cloud/types/classify_parsing_configuration.py +38 -0
  24. llama_cloud/types/cloud_astra_db_vector_store.py +51 -0
  25. llama_cloud/types/cloud_confluence_data_source.py +15 -0
  26. llama_cloud/types/configurable_data_sink_names.py +4 -0
  27. llama_cloud/types/data_sink_component.py +2 -0
  28. llama_cloud/types/data_sink_create_component.py +2 -0
  29. llama_cloud/types/data_source_reader_version_metadata.py +2 -1
  30. llama_cloud/types/data_source_reader_version_metadata_reader_version.py +17 -0
  31. llama_cloud/types/extract_agent.py +3 -0
  32. llama_cloud/types/extract_config.py +4 -0
  33. llama_cloud/types/failure_handling_config.py +37 -0
  34. llama_cloud/types/file_classification.py +41 -0
  35. llama_cloud/types/file_data.py +36 -0
  36. llama_cloud/types/file_store_info_response.py +34 -0
  37. llama_cloud/types/file_store_info_response_status.py +25 -0
  38. llama_cloud/types/legacy_parse_job_config.py +3 -0
  39. llama_cloud/types/llama_extract_settings.py +4 -0
  40. llama_cloud/types/llama_parse_parameters.py +3 -0
  41. llama_cloud/types/managed_open_ai_embedding.py +36 -0
  42. llama_cloud/types/managed_open_ai_embedding_config.py +34 -0
  43. llama_cloud/types/multimodal_parse_resolution.py +17 -0
  44. llama_cloud/types/paginated_response_quota_configuration.py +36 -0
  45. llama_cloud/types/parse_job_config.py +3 -0
  46. llama_cloud/types/pipeline_embedding_config.py +11 -0
  47. llama_cloud/types/quota_configuration.py +53 -0
  48. llama_cloud/types/quota_configuration_configuration_type.py +33 -0
  49. llama_cloud/types/quota_configuration_status.py +21 -0
  50. llama_cloud/types/quota_rate_limit_configuration_value.py +38 -0
  51. llama_cloud/types/quota_rate_limit_configuration_value_denominator_units.py +29 -0
  52. llama_cloud/types/supported_llm_model_names.py +12 -0
  53. llama_cloud/types/update_user_response.py +33 -0
  54. llama_cloud/types/usage_response_active_alerts_item.py +4 -0
  55. llama_cloud/types/user_summary.py +38 -0
  56. llama_cloud/types/webhook_configuration_webhook_events_item.py +20 -0
  57. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.36.dist-info}/METADATA +2 -4
  58. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.36.dist-info}/RECORD +60 -34
  59. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.36.dist-info}/WHEEL +1 -1
  60. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.36.dist-info}/LICENSE +0 -0
llama_cloud/__init__.py CHANGED
@@ -38,7 +38,12 @@ from .types import (
38
38
  ChatData,
39
39
  ChunkMode,
40
40
  ClassificationResult,
41
- ClassifyResponse,
41
+ ClassifierRule,
42
+ ClassifyJob,
43
+ ClassifyJobResults,
44
+ ClassifyJobWithStatus,
45
+ ClassifyParsingConfiguration,
46
+ CloudAstraDbVectorStore,
42
47
  CloudAzStorageBlobDataSource,
43
48
  CloudAzureAiSearchVectorStore,
44
49
  CloudBoxDataSource,
@@ -76,6 +81,7 @@ from .types import (
76
81
  DataSourceCreateCustomMetadataValue,
77
82
  DataSourceCustomMetadataValue,
78
83
  DataSourceReaderVersionMetadata,
84
+ DataSourceReaderVersionMetadataReaderVersion,
79
85
  DataSourceUpdateDispatcherConfig,
80
86
  DeleteParams,
81
87
  DocumentBlock,
@@ -131,12 +137,17 @@ from .types import (
131
137
  ExtractState,
132
138
  ExtractTarget,
133
139
  FailPageMode,
140
+ FailureHandlingConfig,
134
141
  File,
142
+ FileClassification,
135
143
  FileCountByStatusResponse,
144
+ FileData,
136
145
  FileIdPresignedUrl,
137
146
  FileParsePublic,
138
147
  FilePermissionInfoValue,
139
148
  FileResourceInfoValue,
149
+ FileStoreInfoResponse,
150
+ FileStoreInfoResponseStatus,
140
151
  FilterCondition,
141
152
  FilterOperation,
142
153
  FilterOperationEq,
@@ -188,12 +199,15 @@ from .types import (
188
199
  LoadFilesJobConfig,
189
200
  ManagedIngestionStatus,
190
201
  ManagedIngestionStatusResponse,
202
+ ManagedOpenAiEmbedding,
203
+ ManagedOpenAiEmbeddingConfig,
191
204
  MessageAnnotation,
192
205
  MessageRole,
193
206
  MetadataFilter,
194
207
  MetadataFilterValue,
195
208
  MetadataFilters,
196
209
  MetadataFiltersFiltersItem,
210
+ MultimodalParseResolution,
197
211
  NodeRelationship,
198
212
  NoneChunkingConfig,
199
213
  NoneSegmentationConfig,
@@ -214,6 +228,7 @@ from .types import (
214
228
  PaginatedReportResponse,
215
229
  PaginatedResponseAgentData,
216
230
  PaginatedResponseAggregateGroup,
231
+ PaginatedResponseQuotaConfiguration,
217
232
  ParseJobConfig,
218
233
  ParseJobConfigPriority,
219
234
  ParsePlanLevel,
@@ -254,6 +269,7 @@ from .types import (
254
269
  PipelineEmbeddingConfig_CohereEmbedding,
255
270
  PipelineEmbeddingConfig_GeminiEmbedding,
256
271
  PipelineEmbeddingConfig_HuggingfaceApiEmbedding,
272
+ PipelineEmbeddingConfig_ManagedOpenaiEmbedding,
257
273
  PipelineEmbeddingConfig_OpenaiEmbedding,
258
274
  PipelineEmbeddingConfig_VertexaiEmbedding,
259
275
  PipelineFile,
@@ -285,6 +301,11 @@ from .types import (
285
301
  Project,
286
302
  ProjectCreate,
287
303
  PromptConf,
304
+ QuotaConfiguration,
305
+ QuotaConfigurationConfigurationType,
306
+ QuotaConfigurationStatus,
307
+ QuotaRateLimitConfigurationValue,
308
+ QuotaRateLimitConfigurationValueDenominatorUnits,
288
309
  ReRankConfig,
289
310
  ReRankerType,
290
311
  RecurringCreditGrant,
@@ -328,6 +349,7 @@ from .types import (
328
349
  TextNodeRelationshipsValue,
329
350
  TextNodeWithScore,
330
351
  TokenChunkingConfig,
352
+ UpdateUserResponse,
331
353
  UsageAndPlan,
332
354
  UsageMetricResponse,
333
355
  UsageResponse,
@@ -337,6 +359,7 @@ from .types import (
337
359
  UserOrganizationCreate,
338
360
  UserOrganizationDelete,
339
361
  UserOrganizationRole,
362
+ UserSummary,
340
363
  ValidationError,
341
364
  ValidationErrorLocItem,
342
365
  VertexAiEmbeddingConfig,
@@ -366,6 +389,8 @@ from .resources import (
366
389
  ExtractJobCreateBatchDataSchemaOverrideZeroValue,
367
390
  ExtractSchemaValidateRequestDataSchema,
368
391
  ExtractSchemaValidateRequestDataSchemaZeroValue,
392
+ ExtractStatelessRequestDataSchema,
393
+ ExtractStatelessRequestDataSchemaZeroValue,
369
394
  FileCreateFromUrlResourceInfoValue,
370
395
  FileCreatePermissionInfoValue,
371
396
  FileCreateResourceInfoValue,
@@ -399,6 +424,7 @@ from .resources import (
399
424
  projects,
400
425
  reports,
401
426
  retrievers,
427
+ users,
402
428
  )
403
429
  from .environment import LlamaCloudEnvironment
404
430
 
@@ -440,7 +466,12 @@ __all__ = [
440
466
  "ChatData",
441
467
  "ChunkMode",
442
468
  "ClassificationResult",
443
- "ClassifyResponse",
469
+ "ClassifierRule",
470
+ "ClassifyJob",
471
+ "ClassifyJobResults",
472
+ "ClassifyJobWithStatus",
473
+ "ClassifyParsingConfiguration",
474
+ "CloudAstraDbVectorStore",
444
475
  "CloudAzStorageBlobDataSource",
445
476
  "CloudAzureAiSearchVectorStore",
446
477
  "CloudBoxDataSource",
@@ -479,6 +510,7 @@ __all__ = [
479
510
  "DataSourceCreateCustomMetadataValue",
480
511
  "DataSourceCustomMetadataValue",
481
512
  "DataSourceReaderVersionMetadata",
513
+ "DataSourceReaderVersionMetadataReaderVersion",
482
514
  "DataSourceUpdateComponent",
483
515
  "DataSourceUpdateCustomMetadataValue",
484
516
  "DataSourceUpdateDispatcherConfig",
@@ -550,17 +582,24 @@ __all__ = [
550
582
  "ExtractSchemaValidateResponse",
551
583
  "ExtractSchemaValidateResponseDataSchemaValue",
552
584
  "ExtractState",
585
+ "ExtractStatelessRequestDataSchema",
586
+ "ExtractStatelessRequestDataSchemaZeroValue",
553
587
  "ExtractTarget",
554
588
  "FailPageMode",
589
+ "FailureHandlingConfig",
555
590
  "File",
591
+ "FileClassification",
556
592
  "FileCountByStatusResponse",
557
593
  "FileCreateFromUrlResourceInfoValue",
558
594
  "FileCreatePermissionInfoValue",
559
595
  "FileCreateResourceInfoValue",
596
+ "FileData",
560
597
  "FileIdPresignedUrl",
561
598
  "FileParsePublic",
562
599
  "FilePermissionInfoValue",
563
600
  "FileResourceInfoValue",
601
+ "FileStoreInfoResponse",
602
+ "FileStoreInfoResponseStatus",
564
603
  "FilterCondition",
565
604
  "FilterOperation",
566
605
  "FilterOperationEq",
@@ -613,12 +652,15 @@ __all__ = [
613
652
  "LoadFilesJobConfig",
614
653
  "ManagedIngestionStatus",
615
654
  "ManagedIngestionStatusResponse",
655
+ "ManagedOpenAiEmbedding",
656
+ "ManagedOpenAiEmbeddingConfig",
616
657
  "MessageAnnotation",
617
658
  "MessageRole",
618
659
  "MetadataFilter",
619
660
  "MetadataFilterValue",
620
661
  "MetadataFilters",
621
662
  "MetadataFiltersFiltersItem",
663
+ "MultimodalParseResolution",
622
664
  "NodeRelationship",
623
665
  "NoneChunkingConfig",
624
666
  "NoneSegmentationConfig",
@@ -639,6 +681,7 @@ __all__ = [
639
681
  "PaginatedReportResponse",
640
682
  "PaginatedResponseAgentData",
641
683
  "PaginatedResponseAggregateGroup",
684
+ "PaginatedResponseQuotaConfiguration",
642
685
  "ParseJobConfig",
643
686
  "ParseJobConfigPriority",
644
687
  "ParsePlanLevel",
@@ -679,6 +722,7 @@ __all__ = [
679
722
  "PipelineEmbeddingConfig_CohereEmbedding",
680
723
  "PipelineEmbeddingConfig_GeminiEmbedding",
681
724
  "PipelineEmbeddingConfig_HuggingfaceApiEmbedding",
725
+ "PipelineEmbeddingConfig_ManagedOpenaiEmbedding",
682
726
  "PipelineEmbeddingConfig_OpenaiEmbedding",
683
727
  "PipelineEmbeddingConfig_VertexaiEmbedding",
684
728
  "PipelineFile",
@@ -720,6 +764,11 @@ __all__ = [
720
764
  "Project",
721
765
  "ProjectCreate",
722
766
  "PromptConf",
767
+ "QuotaConfiguration",
768
+ "QuotaConfigurationConfigurationType",
769
+ "QuotaConfigurationStatus",
770
+ "QuotaRateLimitConfigurationValue",
771
+ "QuotaRateLimitConfigurationValueDenominatorUnits",
723
772
  "ReRankConfig",
724
773
  "ReRankerType",
725
774
  "RecurringCreditGrant",
@@ -766,6 +815,7 @@ __all__ = [
766
815
  "TokenChunkingConfig",
767
816
  "UnprocessableEntityError",
768
817
  "UpdateReportPlanApiV1ReportsReportIdPlanPatchRequestAction",
818
+ "UpdateUserResponse",
769
819
  "UsageAndPlan",
770
820
  "UsageMetricResponse",
771
821
  "UsageResponse",
@@ -775,6 +825,7 @@ __all__ = [
775
825
  "UserOrganizationCreate",
776
826
  "UserOrganizationDelete",
777
827
  "UserOrganizationRole",
828
+ "UserSummary",
778
829
  "ValidationError",
779
830
  "ValidationErrorLocItem",
780
831
  "VertexAiEmbeddingConfig",
@@ -800,4 +851,5 @@ __all__ = [
800
851
  "projects",
801
852
  "reports",
802
853
  "retrievers",
854
+ "users",
803
855
  ]
llama_cloud/client.py CHANGED
@@ -24,6 +24,7 @@ from .resources.pipelines.client import AsyncPipelinesClient, PipelinesClient
24
24
  from .resources.projects.client import AsyncProjectsClient, ProjectsClient
25
25
  from .resources.reports.client import AsyncReportsClient, ReportsClient
26
26
  from .resources.retrievers.client import AsyncRetrieversClient, RetrieversClient
27
+ from .resources.users.client import AsyncUsersClient, UsersClient
27
28
 
28
29
 
29
30
  class LlamaCloud:
@@ -56,6 +57,7 @@ class LlamaCloud:
56
57
  self.agent_deployments = AgentDeploymentsClient(client_wrapper=self._client_wrapper)
57
58
  self.classifier = ClassifierClient(client_wrapper=self._client_wrapper)
58
59
  self.admin = AdminClient(client_wrapper=self._client_wrapper)
60
+ self.users = UsersClient(client_wrapper=self._client_wrapper)
59
61
  self.llama_extract = LlamaExtractClient(client_wrapper=self._client_wrapper)
60
62
  self.reports = ReportsClient(client_wrapper=self._client_wrapper)
61
63
  self.beta = BetaClient(client_wrapper=self._client_wrapper)
@@ -91,6 +93,7 @@ class AsyncLlamaCloud:
91
93
  self.agent_deployments = AsyncAgentDeploymentsClient(client_wrapper=self._client_wrapper)
92
94
  self.classifier = AsyncClassifierClient(client_wrapper=self._client_wrapper)
93
95
  self.admin = AsyncAdminClient(client_wrapper=self._client_wrapper)
96
+ self.users = AsyncUsersClient(client_wrapper=self._client_wrapper)
94
97
  self.llama_extract = AsyncLlamaExtractClient(client_wrapper=self._client_wrapper)
95
98
  self.reports = AsyncReportsClient(client_wrapper=self._client_wrapper)
96
99
  self.beta = AsyncBetaClient(client_wrapper=self._client_wrapper)
@@ -19,6 +19,7 @@ from . import (
19
19
  projects,
20
20
  reports,
21
21
  retrievers,
22
+ users,
22
23
  )
23
24
  from .data_sinks import DataSinkUpdateComponent
24
25
  from .data_sources import DataSourceUpdateComponent, DataSourceUpdateCustomMetadataValue
@@ -42,6 +43,8 @@ from .llama_extract import (
42
43
  ExtractJobCreateBatchDataSchemaOverrideZeroValue,
43
44
  ExtractSchemaValidateRequestDataSchema,
44
45
  ExtractSchemaValidateRequestDataSchemaZeroValue,
46
+ ExtractStatelessRequestDataSchema,
47
+ ExtractStatelessRequestDataSchemaZeroValue,
45
48
  )
46
49
  from .pipelines import (
47
50
  PipelineFileUpdateCustomMetadataValue,
@@ -78,6 +81,8 @@ __all__ = [
78
81
  "ExtractJobCreateBatchDataSchemaOverrideZeroValue",
79
82
  "ExtractSchemaValidateRequestDataSchema",
80
83
  "ExtractSchemaValidateRequestDataSchemaZeroValue",
84
+ "ExtractStatelessRequestDataSchema",
85
+ "ExtractStatelessRequestDataSchemaZeroValue",
81
86
  "FileCreateFromUrlResourceInfoValue",
82
87
  "FileCreatePermissionInfoValue",
83
88
  "FileCreateResourceInfoValue",
@@ -111,4 +116,5 @@ __all__ = [
111
116
  "projects",
112
117
  "reports",
113
118
  "retrievers",
119
+ "users",
114
120
  ]
@@ -8,6 +8,7 @@ from ...core.api_error import ApiError
8
8
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ...core.remove_none_from_dict import remove_none_from_dict
10
10
  from ...errors.unprocessable_entity_error import UnprocessableEntityError
11
+ from ...types.file_store_info_response import FileStoreInfoResponse
11
12
  from ...types.http_validation_error import HttpValidationError
12
13
  from ...types.license_info_response import LicenseInfoResponse
13
14
 
@@ -53,6 +54,31 @@ class AdminClient:
53
54
  raise ApiError(status_code=_response.status_code, body=_response.text)
54
55
  raise ApiError(status_code=_response.status_code, body=_response_json)
55
56
 
57
+ def get_file_store_info(self) -> FileStoreInfoResponse:
58
+ """
59
+ from llama_cloud.client import LlamaCloud
60
+
61
+ client = LlamaCloud(
62
+ token="YOUR_TOKEN",
63
+ )
64
+ client.admin.get_file_store_info()
65
+ """
66
+ _response = self._client_wrapper.httpx_client.request(
67
+ "GET",
68
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/admin/filestores/info"),
69
+ headers=self._client_wrapper.get_headers(),
70
+ timeout=60,
71
+ )
72
+ if 200 <= _response.status_code < 300:
73
+ return pydantic.parse_obj_as(FileStoreInfoResponse, _response.json()) # type: ignore
74
+ if _response.status_code == 422:
75
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
76
+ try:
77
+ _response_json = _response.json()
78
+ except JSONDecodeError:
79
+ raise ApiError(status_code=_response.status_code, body=_response.text)
80
+ raise ApiError(status_code=_response.status_code, body=_response_json)
81
+
56
82
 
57
83
  class AsyncAdminClient:
58
84
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -86,3 +112,28 @@ class AsyncAdminClient:
86
112
  except JSONDecodeError:
87
113
  raise ApiError(status_code=_response.status_code, body=_response.text)
88
114
  raise ApiError(status_code=_response.status_code, body=_response_json)
115
+
116
+ async def get_file_store_info(self) -> FileStoreInfoResponse:
117
+ """
118
+ from llama_cloud.client import AsyncLlamaCloud
119
+
120
+ client = AsyncLlamaCloud(
121
+ token="YOUR_TOKEN",
122
+ )
123
+ await client.admin.get_file_store_info()
124
+ """
125
+ _response = await self._client_wrapper.httpx_client.request(
126
+ "GET",
127
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/admin/filestores/info"),
128
+ headers=self._client_wrapper.get_headers(),
129
+ timeout=60,
130
+ )
131
+ if 200 <= _response.status_code < 300:
132
+ return pydantic.parse_obj_as(FileStoreInfoResponse, _response.json()) # type: ignore
133
+ if _response.status_code == 422:
134
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
135
+ try:
136
+ _response_json = _response.json()
137
+ except JSONDecodeError:
138
+ raise ApiError(status_code=_response.status_code, body=_response.text)
139
+ raise ApiError(status_code=_response.status_code, body=_response_json)