llama-cloud 0.1.34__py3-none-any.whl → 0.1.35__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 (41) hide show
  1. llama_cloud/__init__.py +34 -0
  2. llama_cloud/client.py +3 -0
  3. llama_cloud/resources/__init__.py +6 -0
  4. llama_cloud/resources/beta/client.py +211 -8
  5. llama_cloud/resources/files/client.py +226 -0
  6. llama_cloud/resources/llama_extract/__init__.py +4 -0
  7. llama_cloud/resources/llama_extract/client.py +179 -0
  8. llama_cloud/resources/llama_extract/types/__init__.py +4 -0
  9. llama_cloud/resources/llama_extract/types/extract_stateless_request_data_schema.py +9 -0
  10. llama_cloud/resources/llama_extract/types/extract_stateless_request_data_schema_zero_value.py +7 -0
  11. llama_cloud/resources/parsing/client.py +24 -0
  12. llama_cloud/resources/users/__init__.py +2 -0
  13. llama_cloud/resources/users/client.py +155 -0
  14. llama_cloud/types/__init__.py +28 -0
  15. llama_cloud/types/data_source_reader_version_metadata.py +2 -1
  16. llama_cloud/types/data_source_reader_version_metadata_reader_version.py +17 -0
  17. llama_cloud/types/extract_agent.py +3 -0
  18. llama_cloud/types/extract_config.py +4 -0
  19. llama_cloud/types/file_data.py +36 -0
  20. llama_cloud/types/legacy_parse_job_config.py +3 -0
  21. llama_cloud/types/llama_extract_settings.py +4 -0
  22. llama_cloud/types/llama_parse_parameters.py +3 -0
  23. llama_cloud/types/managed_open_ai_embedding.py +36 -0
  24. llama_cloud/types/managed_open_ai_embedding_config.py +34 -0
  25. llama_cloud/types/multimodal_parse_resolution.py +17 -0
  26. llama_cloud/types/paginated_response_quota_configuration.py +36 -0
  27. llama_cloud/types/parse_job_config.py +3 -0
  28. llama_cloud/types/pipeline_embedding_config.py +11 -0
  29. llama_cloud/types/quota_configuration.py +53 -0
  30. llama_cloud/types/quota_configuration_configuration_type.py +33 -0
  31. llama_cloud/types/quota_configuration_status.py +21 -0
  32. llama_cloud/types/quota_rate_limit_configuration_value.py +38 -0
  33. llama_cloud/types/quota_rate_limit_configuration_value_denominator_units.py +29 -0
  34. llama_cloud/types/update_user_response.py +33 -0
  35. llama_cloud/types/usage_response_active_alerts_item.py +4 -0
  36. llama_cloud/types/user_summary.py +38 -0
  37. llama_cloud/types/webhook_configuration_webhook_events_item.py +20 -0
  38. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.35.dist-info}/METADATA +1 -1
  39. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.35.dist-info}/RECORD +41 -24
  40. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.35.dist-info}/LICENSE +0 -0
  41. {llama_cloud-0.1.34.dist-info → llama_cloud-0.1.35.dist-info}/WHEEL +0 -0
@@ -4,6 +4,8 @@ import typing
4
4
  import urllib.parse
5
5
  from json.decoder import JSONDecodeError
6
6
 
7
+ import typing_extensions
8
+
7
9
  from ...core.api_error import ApiError
8
10
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
11
  from ...core.jsonable_encoder import jsonable_encoder
@@ -18,6 +20,7 @@ from ...types.http_validation_error import HttpValidationError
18
20
  from ...types.llama_parse_parameters import LlamaParseParameters
19
21
  from ...types.paginated_response_agent_data import PaginatedResponseAgentData
20
22
  from ...types.paginated_response_aggregate_group import PaginatedResponseAggregateGroup
23
+ from ...types.paginated_response_quota_configuration import PaginatedResponseQuotaConfiguration
21
24
 
22
25
  try:
23
26
  import pydantic
@@ -208,12 +211,18 @@ class BetaClient:
208
211
  raise ApiError(status_code=_response.status_code, body=_response.text)
209
212
  raise ApiError(status_code=_response.status_code, body=_response_json)
210
213
 
211
- def get_agent_data(self, item_id: str) -> AgentData:
214
+ def get_agent_data(
215
+ self, item_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
216
+ ) -> AgentData:
212
217
  """
213
218
  Get agent data by ID.
214
219
 
215
220
  Parameters:
216
221
  - item_id: str.
222
+
223
+ - project_id: typing.Optional[str].
224
+
225
+ - organization_id: typing.Optional[str].
217
226
  ---
218
227
  from llama_cloud.client import LlamaCloud
219
228
 
@@ -227,6 +236,7 @@ class BetaClient:
227
236
  _response = self._client_wrapper.httpx_client.request(
228
237
  "GET",
229
238
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/beta/agent-data/{item_id}"),
239
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
230
240
  headers=self._client_wrapper.get_headers(),
231
241
  timeout=60,
232
242
  )
@@ -240,13 +250,24 @@ class BetaClient:
240
250
  raise ApiError(status_code=_response.status_code, body=_response.text)
241
251
  raise ApiError(status_code=_response.status_code, body=_response_json)
242
252
 
243
- def update_agent_data(self, item_id: str, *, data: typing.Dict[str, typing.Any]) -> AgentData:
253
+ def update_agent_data(
254
+ self,
255
+ item_id: str,
256
+ *,
257
+ project_id: typing.Optional[str] = None,
258
+ organization_id: typing.Optional[str] = None,
259
+ data: typing.Dict[str, typing.Any],
260
+ ) -> AgentData:
244
261
  """
245
262
  Update agent data by ID (overwrites).
246
263
 
247
264
  Parameters:
248
265
  - item_id: str.
249
266
 
267
+ - project_id: typing.Optional[str].
268
+
269
+ - organization_id: typing.Optional[str].
270
+
250
271
  - data: typing.Dict[str, typing.Any].
251
272
  ---
252
273
  from llama_cloud.client import LlamaCloud
@@ -262,6 +283,7 @@ class BetaClient:
262
283
  _response = self._client_wrapper.httpx_client.request(
263
284
  "PUT",
264
285
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/beta/agent-data/{item_id}"),
286
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
265
287
  json=jsonable_encoder({"data": data}),
266
288
  headers=self._client_wrapper.get_headers(),
267
289
  timeout=60,
@@ -276,12 +298,18 @@ class BetaClient:
276
298
  raise ApiError(status_code=_response.status_code, body=_response.text)
277
299
  raise ApiError(status_code=_response.status_code, body=_response_json)
278
300
 
279
- def delete_agent_data(self, item_id: str) -> typing.Dict[str, str]:
301
+ def delete_agent_data(
302
+ self, item_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
303
+ ) -> typing.Dict[str, str]:
280
304
  """
281
305
  Delete agent data by ID.
282
306
 
283
307
  Parameters:
284
308
  - item_id: str.
309
+
310
+ - project_id: typing.Optional[str].
311
+
312
+ - organization_id: typing.Optional[str].
285
313
  ---
286
314
  from llama_cloud.client import LlamaCloud
287
315
 
@@ -295,6 +323,7 @@ class BetaClient:
295
323
  _response = self._client_wrapper.httpx_client.request(
296
324
  "DELETE",
297
325
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/beta/agent-data/{item_id}"),
326
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
298
327
  headers=self._client_wrapper.get_headers(),
299
328
  timeout=60,
300
329
  )
@@ -309,12 +338,22 @@ class BetaClient:
309
338
  raise ApiError(status_code=_response.status_code, body=_response_json)
310
339
 
311
340
  def create_agent_data(
312
- self, *, agent_slug: str, collection: typing.Optional[str] = OMIT, data: typing.Dict[str, typing.Any]
341
+ self,
342
+ *,
343
+ project_id: typing.Optional[str] = None,
344
+ organization_id: typing.Optional[str] = None,
345
+ agent_slug: str,
346
+ collection: typing.Optional[str] = OMIT,
347
+ data: typing.Dict[str, typing.Any],
313
348
  ) -> AgentData:
314
349
  """
315
350
  Create new agent data.
316
351
 
317
352
  Parameters:
353
+ - project_id: typing.Optional[str].
354
+
355
+ - organization_id: typing.Optional[str].
356
+
318
357
  - agent_slug: str.
319
358
 
320
359
  - collection: typing.Optional[str].
@@ -337,6 +376,7 @@ class BetaClient:
337
376
  _response = self._client_wrapper.httpx_client.request(
338
377
  "POST",
339
378
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/agent-data"),
379
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
340
380
  json=jsonable_encoder(_request),
341
381
  headers=self._client_wrapper.get_headers(),
342
382
  timeout=60,
@@ -354,6 +394,8 @@ class BetaClient:
354
394
  def search_agent_data_api_v_1_beta_agent_data_search_post(
355
395
  self,
356
396
  *,
397
+ project_id: typing.Optional[str] = None,
398
+ organization_id: typing.Optional[str] = None,
357
399
  page_size: typing.Optional[int] = OMIT,
358
400
  page_token: typing.Optional[str] = OMIT,
359
401
  filter: typing.Optional[typing.Dict[str, typing.Optional[FilterOperation]]] = OMIT,
@@ -367,6 +409,10 @@ class BetaClient:
367
409
  Search agent data with filtering, sorting, and pagination.
368
410
 
369
411
  Parameters:
412
+ - project_id: typing.Optional[str].
413
+
414
+ - organization_id: typing.Optional[str].
415
+
370
416
  - page_size: typing.Optional[int].
371
417
 
372
418
  - page_token: typing.Optional[str].
@@ -410,6 +456,7 @@ class BetaClient:
410
456
  _response = self._client_wrapper.httpx_client.request(
411
457
  "POST",
412
458
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/agent-data/:search"),
459
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
413
460
  json=jsonable_encoder(_request),
414
461
  headers=self._client_wrapper.get_headers(),
415
462
  timeout=60,
@@ -427,6 +474,8 @@ class BetaClient:
427
474
  def aggregate_agent_data_api_v_1_beta_agent_data_aggregate_post(
428
475
  self,
429
476
  *,
477
+ project_id: typing.Optional[str] = None,
478
+ organization_id: typing.Optional[str] = None,
430
479
  page_size: typing.Optional[int] = OMIT,
431
480
  page_token: typing.Optional[str] = OMIT,
432
481
  filter: typing.Optional[typing.Dict[str, typing.Optional[FilterOperation]]] = OMIT,
@@ -442,6 +491,10 @@ class BetaClient:
442
491
  Aggregate agent data with grouping and optional counting/first item retrieval.
443
492
 
444
493
  Parameters:
494
+ - project_id: typing.Optional[str].
495
+
496
+ - organization_id: typing.Optional[str].
497
+
445
498
  - page_size: typing.Optional[int].
446
499
 
447
500
  - page_token: typing.Optional[str].
@@ -493,6 +546,7 @@ class BetaClient:
493
546
  _response = self._client_wrapper.httpx_client.request(
494
547
  "POST",
495
548
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/agent-data/:aggregate"),
549
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
496
550
  json=jsonable_encoder(_request),
497
551
  headers=self._client_wrapper.get_headers(),
498
552
  timeout=60,
@@ -507,6 +561,55 @@ class BetaClient:
507
561
  raise ApiError(status_code=_response.status_code, body=_response.text)
508
562
  raise ApiError(status_code=_response.status_code, body=_response_json)
509
563
 
564
+ def list_quota_configurations(
565
+ self,
566
+ *,
567
+ source_type: typing_extensions.Literal["organization"],
568
+ source_id: str,
569
+ page: typing.Optional[int] = None,
570
+ page_size: typing.Optional[int] = None,
571
+ ) -> PaginatedResponseQuotaConfiguration:
572
+ """
573
+ Retrieve a paginated list of quota configurations with optional filtering.
574
+
575
+ Parameters:
576
+ - source_type: typing_extensions.Literal["organization"].
577
+
578
+ - source_id: str.
579
+
580
+ - page: typing.Optional[int].
581
+
582
+ - page_size: typing.Optional[int].
583
+ ---
584
+ from llama_cloud.client import LlamaCloud
585
+
586
+ client = LlamaCloud(
587
+ token="YOUR_TOKEN",
588
+ )
589
+ client.beta.list_quota_configurations(
590
+ source_type="organization",
591
+ source_id="string",
592
+ )
593
+ """
594
+ _response = self._client_wrapper.httpx_client.request(
595
+ "GET",
596
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/quota-management"),
597
+ params=remove_none_from_dict(
598
+ {"source_type": source_type, "source_id": source_id, "page": page, "page_size": page_size}
599
+ ),
600
+ headers=self._client_wrapper.get_headers(),
601
+ timeout=60,
602
+ )
603
+ if 200 <= _response.status_code < 300:
604
+ return pydantic.parse_obj_as(PaginatedResponseQuotaConfiguration, _response.json()) # type: ignore
605
+ if _response.status_code == 422:
606
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
607
+ try:
608
+ _response_json = _response.json()
609
+ except JSONDecodeError:
610
+ raise ApiError(status_code=_response.status_code, body=_response.text)
611
+ raise ApiError(status_code=_response.status_code, body=_response_json)
612
+
510
613
 
511
614
  class AsyncBetaClient:
512
615
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -685,12 +788,18 @@ class AsyncBetaClient:
685
788
  raise ApiError(status_code=_response.status_code, body=_response.text)
686
789
  raise ApiError(status_code=_response.status_code, body=_response_json)
687
790
 
688
- async def get_agent_data(self, item_id: str) -> AgentData:
791
+ async def get_agent_data(
792
+ self, item_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
793
+ ) -> AgentData:
689
794
  """
690
795
  Get agent data by ID.
691
796
 
692
797
  Parameters:
693
798
  - item_id: str.
799
+
800
+ - project_id: typing.Optional[str].
801
+
802
+ - organization_id: typing.Optional[str].
694
803
  ---
695
804
  from llama_cloud.client import AsyncLlamaCloud
696
805
 
@@ -704,6 +813,7 @@ class AsyncBetaClient:
704
813
  _response = await self._client_wrapper.httpx_client.request(
705
814
  "GET",
706
815
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/beta/agent-data/{item_id}"),
816
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
707
817
  headers=self._client_wrapper.get_headers(),
708
818
  timeout=60,
709
819
  )
@@ -717,13 +827,24 @@ class AsyncBetaClient:
717
827
  raise ApiError(status_code=_response.status_code, body=_response.text)
718
828
  raise ApiError(status_code=_response.status_code, body=_response_json)
719
829
 
720
- async def update_agent_data(self, item_id: str, *, data: typing.Dict[str, typing.Any]) -> AgentData:
830
+ async def update_agent_data(
831
+ self,
832
+ item_id: str,
833
+ *,
834
+ project_id: typing.Optional[str] = None,
835
+ organization_id: typing.Optional[str] = None,
836
+ data: typing.Dict[str, typing.Any],
837
+ ) -> AgentData:
721
838
  """
722
839
  Update agent data by ID (overwrites).
723
840
 
724
841
  Parameters:
725
842
  - item_id: str.
726
843
 
844
+ - project_id: typing.Optional[str].
845
+
846
+ - organization_id: typing.Optional[str].
847
+
727
848
  - data: typing.Dict[str, typing.Any].
728
849
  ---
729
850
  from llama_cloud.client import AsyncLlamaCloud
@@ -739,6 +860,7 @@ class AsyncBetaClient:
739
860
  _response = await self._client_wrapper.httpx_client.request(
740
861
  "PUT",
741
862
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/beta/agent-data/{item_id}"),
863
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
742
864
  json=jsonable_encoder({"data": data}),
743
865
  headers=self._client_wrapper.get_headers(),
744
866
  timeout=60,
@@ -753,12 +875,18 @@ class AsyncBetaClient:
753
875
  raise ApiError(status_code=_response.status_code, body=_response.text)
754
876
  raise ApiError(status_code=_response.status_code, body=_response_json)
755
877
 
756
- async def delete_agent_data(self, item_id: str) -> typing.Dict[str, str]:
878
+ async def delete_agent_data(
879
+ self, item_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
880
+ ) -> typing.Dict[str, str]:
757
881
  """
758
882
  Delete agent data by ID.
759
883
 
760
884
  Parameters:
761
885
  - item_id: str.
886
+
887
+ - project_id: typing.Optional[str].
888
+
889
+ - organization_id: typing.Optional[str].
762
890
  ---
763
891
  from llama_cloud.client import AsyncLlamaCloud
764
892
 
@@ -772,6 +900,7 @@ class AsyncBetaClient:
772
900
  _response = await self._client_wrapper.httpx_client.request(
773
901
  "DELETE",
774
902
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/beta/agent-data/{item_id}"),
903
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
775
904
  headers=self._client_wrapper.get_headers(),
776
905
  timeout=60,
777
906
  )
@@ -786,12 +915,22 @@ class AsyncBetaClient:
786
915
  raise ApiError(status_code=_response.status_code, body=_response_json)
787
916
 
788
917
  async def create_agent_data(
789
- self, *, agent_slug: str, collection: typing.Optional[str] = OMIT, data: typing.Dict[str, typing.Any]
918
+ self,
919
+ *,
920
+ project_id: typing.Optional[str] = None,
921
+ organization_id: typing.Optional[str] = None,
922
+ agent_slug: str,
923
+ collection: typing.Optional[str] = OMIT,
924
+ data: typing.Dict[str, typing.Any],
790
925
  ) -> AgentData:
791
926
  """
792
927
  Create new agent data.
793
928
 
794
929
  Parameters:
930
+ - project_id: typing.Optional[str].
931
+
932
+ - organization_id: typing.Optional[str].
933
+
795
934
  - agent_slug: str.
796
935
 
797
936
  - collection: typing.Optional[str].
@@ -814,6 +953,7 @@ class AsyncBetaClient:
814
953
  _response = await self._client_wrapper.httpx_client.request(
815
954
  "POST",
816
955
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/agent-data"),
956
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
817
957
  json=jsonable_encoder(_request),
818
958
  headers=self._client_wrapper.get_headers(),
819
959
  timeout=60,
@@ -831,6 +971,8 @@ class AsyncBetaClient:
831
971
  async def search_agent_data_api_v_1_beta_agent_data_search_post(
832
972
  self,
833
973
  *,
974
+ project_id: typing.Optional[str] = None,
975
+ organization_id: typing.Optional[str] = None,
834
976
  page_size: typing.Optional[int] = OMIT,
835
977
  page_token: typing.Optional[str] = OMIT,
836
978
  filter: typing.Optional[typing.Dict[str, typing.Optional[FilterOperation]]] = OMIT,
@@ -844,6 +986,10 @@ class AsyncBetaClient:
844
986
  Search agent data with filtering, sorting, and pagination.
845
987
 
846
988
  Parameters:
989
+ - project_id: typing.Optional[str].
990
+
991
+ - organization_id: typing.Optional[str].
992
+
847
993
  - page_size: typing.Optional[int].
848
994
 
849
995
  - page_token: typing.Optional[str].
@@ -887,6 +1033,7 @@ class AsyncBetaClient:
887
1033
  _response = await self._client_wrapper.httpx_client.request(
888
1034
  "POST",
889
1035
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/agent-data/:search"),
1036
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
890
1037
  json=jsonable_encoder(_request),
891
1038
  headers=self._client_wrapper.get_headers(),
892
1039
  timeout=60,
@@ -904,6 +1051,8 @@ class AsyncBetaClient:
904
1051
  async def aggregate_agent_data_api_v_1_beta_agent_data_aggregate_post(
905
1052
  self,
906
1053
  *,
1054
+ project_id: typing.Optional[str] = None,
1055
+ organization_id: typing.Optional[str] = None,
907
1056
  page_size: typing.Optional[int] = OMIT,
908
1057
  page_token: typing.Optional[str] = OMIT,
909
1058
  filter: typing.Optional[typing.Dict[str, typing.Optional[FilterOperation]]] = OMIT,
@@ -919,6 +1068,10 @@ class AsyncBetaClient:
919
1068
  Aggregate agent data with grouping and optional counting/first item retrieval.
920
1069
 
921
1070
  Parameters:
1071
+ - project_id: typing.Optional[str].
1072
+
1073
+ - organization_id: typing.Optional[str].
1074
+
922
1075
  - page_size: typing.Optional[int].
923
1076
 
924
1077
  - page_token: typing.Optional[str].
@@ -970,6 +1123,7 @@ class AsyncBetaClient:
970
1123
  _response = await self._client_wrapper.httpx_client.request(
971
1124
  "POST",
972
1125
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/agent-data/:aggregate"),
1126
+ params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
973
1127
  json=jsonable_encoder(_request),
974
1128
  headers=self._client_wrapper.get_headers(),
975
1129
  timeout=60,
@@ -983,3 +1137,52 @@ class AsyncBetaClient:
983
1137
  except JSONDecodeError:
984
1138
  raise ApiError(status_code=_response.status_code, body=_response.text)
985
1139
  raise ApiError(status_code=_response.status_code, body=_response_json)
1140
+
1141
+ async def list_quota_configurations(
1142
+ self,
1143
+ *,
1144
+ source_type: typing_extensions.Literal["organization"],
1145
+ source_id: str,
1146
+ page: typing.Optional[int] = None,
1147
+ page_size: typing.Optional[int] = None,
1148
+ ) -> PaginatedResponseQuotaConfiguration:
1149
+ """
1150
+ Retrieve a paginated list of quota configurations with optional filtering.
1151
+
1152
+ Parameters:
1153
+ - source_type: typing_extensions.Literal["organization"].
1154
+
1155
+ - source_id: str.
1156
+
1157
+ - page: typing.Optional[int].
1158
+
1159
+ - page_size: typing.Optional[int].
1160
+ ---
1161
+ from llama_cloud.client import AsyncLlamaCloud
1162
+
1163
+ client = AsyncLlamaCloud(
1164
+ token="YOUR_TOKEN",
1165
+ )
1166
+ await client.beta.list_quota_configurations(
1167
+ source_type="organization",
1168
+ source_id="string",
1169
+ )
1170
+ """
1171
+ _response = await self._client_wrapper.httpx_client.request(
1172
+ "GET",
1173
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/beta/quota-management"),
1174
+ params=remove_none_from_dict(
1175
+ {"source_type": source_type, "source_id": source_id, "page": page, "page_size": page_size}
1176
+ ),
1177
+ headers=self._client_wrapper.get_headers(),
1178
+ timeout=60,
1179
+ )
1180
+ if 200 <= _response.status_code < 300:
1181
+ return pydantic.parse_obj_as(PaginatedResponseQuotaConfiguration, _response.json()) # type: ignore
1182
+ if _response.status_code == 422:
1183
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
1184
+ try:
1185
+ _response_json = _response.json()
1186
+ except JSONDecodeError:
1187
+ raise ApiError(status_code=_response.status_code, body=_response.text)
1188
+ raise ApiError(status_code=_response.status_code, body=_response_json)