llama-cloud 0.1.6__py3-none-any.whl → 0.1.7a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of llama-cloud might be problematic. Click here for more details.
- llama_cloud/__init__.py +140 -6
- llama_cloud/client.py +15 -0
- llama_cloud/environment.py +1 -1
- llama_cloud/resources/__init__.py +15 -0
- llama_cloud/{types/token.py → resources/chat_apps/__init__.py} +0 -3
- llama_cloud/resources/chat_apps/client.py +620 -0
- llama_cloud/resources/data_sinks/client.py +12 -12
- llama_cloud/resources/data_sources/client.py +14 -14
- llama_cloud/resources/embedding_model_configs/client.py +20 -76
- llama_cloud/resources/evals/client.py +26 -36
- llama_cloud/resources/extraction/client.py +32 -32
- llama_cloud/resources/files/client.py +40 -44
- llama_cloud/resources/jobs/__init__.py +2 -0
- llama_cloud/resources/jobs/client.py +148 -0
- llama_cloud/resources/llama_extract/__init__.py +5 -0
- llama_cloud/resources/llama_extract/client.py +1038 -0
- llama_cloud/resources/llama_extract/types/__init__.py +6 -0
- llama_cloud/resources/llama_extract/types/extract_agent_create_data_schema_value.py +7 -0
- llama_cloud/resources/llama_extract/types/extract_agent_update_data_schema_value.py +7 -0
- llama_cloud/resources/organizations/client.py +66 -70
- llama_cloud/resources/parsing/client.py +448 -428
- llama_cloud/resources/pipelines/client.py +256 -344
- llama_cloud/resources/projects/client.py +34 -60
- llama_cloud/resources/reports/__init__.py +5 -0
- llama_cloud/resources/reports/client.py +1198 -0
- llama_cloud/resources/reports/types/__init__.py +7 -0
- llama_cloud/resources/reports/types/update_report_plan_api_v_1_reports_report_id_plan_patch_request_action.py +25 -0
- llama_cloud/resources/retrievers/__init__.py +2 -0
- llama_cloud/resources/retrievers/client.py +654 -0
- llama_cloud/types/__init__.py +128 -6
- llama_cloud/types/{chat_message.py → app_schema_chat_chat_message.py} +3 -3
- llama_cloud/types/azure_open_ai_embedding.py +6 -12
- llama_cloud/types/base_prompt_template.py +2 -6
- llama_cloud/types/bedrock_embedding.py +6 -12
- llama_cloud/types/character_splitter.py +2 -4
- llama_cloud/types/chat_app.py +44 -0
- llama_cloud/types/chat_app_response.py +41 -0
- llama_cloud/types/cloud_az_storage_blob_data_source.py +7 -15
- llama_cloud/types/cloud_box_data_source.py +6 -12
- llama_cloud/types/cloud_confluence_data_source.py +6 -6
- llama_cloud/types/cloud_document.py +1 -3
- llama_cloud/types/cloud_document_create.py +1 -3
- llama_cloud/types/cloud_jira_data_source.py +4 -6
- llama_cloud/types/cloud_notion_page_data_source.py +2 -2
- llama_cloud/types/cloud_one_drive_data_source.py +3 -5
- llama_cloud/types/cloud_postgres_vector_store.py +1 -0
- llama_cloud/types/cloud_s_3_data_source.py +4 -8
- llama_cloud/types/cloud_sharepoint_data_source.py +6 -8
- llama_cloud/types/cloud_slack_data_source.py +6 -6
- llama_cloud/types/code_splitter.py +1 -1
- llama_cloud/types/cohere_embedding.py +3 -7
- llama_cloud/types/composite_retrieval_mode.py +21 -0
- llama_cloud/types/composite_retrieval_result.py +38 -0
- llama_cloud/types/composite_retrieved_text_node.py +42 -0
- llama_cloud/types/data_sink.py +4 -4
- llama_cloud/types/data_sink_component.py +20 -0
- llama_cloud/types/data_source.py +5 -7
- llama_cloud/types/data_source_component.py +28 -0
- llama_cloud/types/data_source_create.py +1 -3
- llama_cloud/types/edit_suggestion.py +39 -0
- llama_cloud/types/embedding_model_config.py +2 -2
- llama_cloud/types/embedding_model_config_update.py +2 -4
- llama_cloud/types/eval_dataset.py +2 -2
- llama_cloud/types/eval_dataset_job_record.py +8 -13
- llama_cloud/types/eval_execution_params_override.py +2 -6
- llama_cloud/types/eval_question.py +2 -2
- llama_cloud/types/extract_agent.py +45 -0
- llama_cloud/types/extract_agent_data_schema_value.py +5 -0
- llama_cloud/types/extract_config.py +40 -0
- llama_cloud/types/extract_job.py +35 -0
- llama_cloud/types/extract_job_create.py +40 -0
- llama_cloud/types/extract_job_create_data_schema_override_value.py +7 -0
- llama_cloud/types/extract_mode.py +17 -0
- llama_cloud/types/extract_resultset.py +46 -0
- llama_cloud/types/extract_resultset_data.py +11 -0
- llama_cloud/types/extract_resultset_data_item_value.py +7 -0
- llama_cloud/types/extract_resultset_data_zero_value.py +7 -0
- llama_cloud/types/extract_resultset_extraction_metadata_value.py +7 -0
- llama_cloud/types/extraction_result.py +2 -2
- llama_cloud/types/extraction_schema.py +3 -5
- llama_cloud/types/file.py +9 -14
- llama_cloud/types/filter_condition.py +9 -1
- llama_cloud/types/filter_operator.py +6 -2
- llama_cloud/types/gemini_embedding.py +6 -10
- llama_cloud/types/hugging_face_inference_api_embedding.py +11 -27
- llama_cloud/types/hugging_face_inference_api_embedding_token.py +5 -0
- llama_cloud/types/image_block.py +35 -0
- llama_cloud/types/input_message.py +2 -4
- llama_cloud/types/job_names.py +89 -0
- llama_cloud/types/job_record.py +57 -0
- llama_cloud/types/job_record_with_usage_metrics.py +36 -0
- llama_cloud/types/llama_index_core_base_llms_types_chat_message.py +39 -0
- llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +33 -0
- llama_cloud/types/llama_parse_parameters.py +4 -0
- llama_cloud/types/llm.py +3 -4
- llama_cloud/types/llm_model_data.py +1 -0
- llama_cloud/types/llm_parameters.py +3 -5
- llama_cloud/types/local_eval.py +8 -10
- llama_cloud/types/local_eval_results.py +1 -1
- llama_cloud/types/managed_ingestion_status.py +4 -0
- llama_cloud/types/managed_ingestion_status_response.py +4 -5
- llama_cloud/types/markdown_element_node_parser.py +3 -5
- llama_cloud/types/markdown_node_parser.py +1 -1
- llama_cloud/types/metadata_filter.py +2 -2
- llama_cloud/types/metadata_filter_value.py +5 -0
- llama_cloud/types/metric_result.py +3 -3
- llama_cloud/types/node_parser.py +1 -1
- llama_cloud/types/object_type.py +4 -0
- llama_cloud/types/open_ai_embedding.py +6 -12
- llama_cloud/types/organization.py +7 -2
- llama_cloud/types/page_splitter_node_parser.py +2 -2
- llama_cloud/types/paginated_jobs_history_with_metrics.py +35 -0
- llama_cloud/types/paginated_report_response.py +35 -0
- llama_cloud/types/parse_plan_level.py +21 -0
- llama_cloud/types/permission.py +3 -3
- llama_cloud/types/pipeline.py +7 -17
- llama_cloud/types/pipeline_configuration_hashes.py +3 -3
- llama_cloud/types/pipeline_create.py +8 -16
- llama_cloud/types/pipeline_data_source.py +7 -13
- llama_cloud/types/pipeline_data_source_component.py +28 -0
- llama_cloud/types/pipeline_data_source_create.py +1 -3
- llama_cloud/types/pipeline_deployment.py +4 -4
- llama_cloud/types/pipeline_file.py +13 -24
- llama_cloud/types/pipeline_file_create.py +1 -3
- llama_cloud/types/playground_session.py +4 -4
- llama_cloud/types/preset_retrieval_params.py +8 -14
- llama_cloud/types/presigned_url.py +1 -3
- llama_cloud/types/progress_event.py +44 -0
- llama_cloud/types/progress_event_status.py +33 -0
- llama_cloud/types/project.py +2 -2
- llama_cloud/types/prompt_mixin_prompts.py +1 -1
- llama_cloud/types/prompt_spec.py +3 -5
- llama_cloud/types/related_node_info.py +2 -2
- llama_cloud/types/related_node_info_node_type.py +7 -0
- llama_cloud/types/report.py +33 -0
- llama_cloud/types/report_block.py +34 -0
- llama_cloud/types/report_block_dependency.py +29 -0
- llama_cloud/types/report_create_response.py +31 -0
- llama_cloud/types/report_event_item.py +40 -0
- llama_cloud/types/report_event_item_event_data.py +45 -0
- llama_cloud/types/report_event_type.py +37 -0
- llama_cloud/types/report_metadata.py +39 -0
- llama_cloud/types/report_plan.py +36 -0
- llama_cloud/types/report_plan_block.py +36 -0
- llama_cloud/types/report_query.py +33 -0
- llama_cloud/types/report_response.py +41 -0
- llama_cloud/types/report_state.py +37 -0
- llama_cloud/types/report_state_event.py +38 -0
- llama_cloud/types/report_update_event.py +38 -0
- llama_cloud/types/retrieve_results.py +1 -1
- llama_cloud/types/retriever.py +45 -0
- llama_cloud/types/retriever_create.py +37 -0
- llama_cloud/types/retriever_pipeline.py +37 -0
- llama_cloud/types/role.py +3 -3
- llama_cloud/types/sentence_splitter.py +2 -4
- llama_cloud/types/status_enum.py +4 -0
- llama_cloud/types/supported_llm_model_names.py +4 -0
- llama_cloud/types/text_block.py +31 -0
- llama_cloud/types/text_node.py +15 -8
- llama_cloud/types/token_text_splitter.py +1 -1
- llama_cloud/types/usage_metric_response.py +34 -0
- llama_cloud/types/user_job_record.py +32 -0
- llama_cloud/types/user_organization.py +5 -9
- llama_cloud/types/user_organization_create.py +4 -4
- llama_cloud/types/user_organization_delete.py +2 -2
- llama_cloud/types/user_organization_role.py +2 -2
- llama_cloud/types/vertex_text_embedding.py +5 -9
- {llama_cloud-0.1.6.dist-info → llama_cloud-0.1.7a1.dist-info}/METADATA +2 -1
- llama_cloud-0.1.7a1.dist-info/RECORD +310 -0
- llama_cloud/types/value.py +0 -5
- llama_cloud-0.1.6.dist-info/RECORD +0 -241
- {llama_cloud-0.1.6.dist-info → llama_cloud-0.1.7a1.dist-info}/LICENSE +0 -0
- {llama_cloud-0.1.6.dist-info → llama_cloud-0.1.7a1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from .extract_agent_create_data_schema_value import ExtractAgentCreateDataSchemaValue
|
|
4
|
+
from .extract_agent_update_data_schema_value import ExtractAgentUpdateDataSchemaValue
|
|
5
|
+
|
|
6
|
+
__all__ = ["ExtractAgentCreateDataSchemaValue", "ExtractAgentUpdateDataSchemaValue"]
|
|
@@ -79,7 +79,7 @@ class OrganizationsClient:
|
|
|
79
79
|
)
|
|
80
80
|
client.organizations.create_organization(
|
|
81
81
|
request=OrganizationCreate(
|
|
82
|
-
name="
|
|
82
|
+
name="string",
|
|
83
83
|
),
|
|
84
84
|
)
|
|
85
85
|
"""
|
|
@@ -115,7 +115,7 @@ class OrganizationsClient:
|
|
|
115
115
|
)
|
|
116
116
|
client.organizations.upsert_organization(
|
|
117
117
|
request=OrganizationCreate(
|
|
118
|
-
name="
|
|
118
|
+
name="string",
|
|
119
119
|
),
|
|
120
120
|
)
|
|
121
121
|
"""
|
|
@@ -177,7 +177,7 @@ class OrganizationsClient:
|
|
|
177
177
|
token="YOUR_TOKEN",
|
|
178
178
|
)
|
|
179
179
|
client.organizations.set_default_organization(
|
|
180
|
-
organization_id="
|
|
180
|
+
organization_id="string",
|
|
181
181
|
)
|
|
182
182
|
"""
|
|
183
183
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -210,7 +210,7 @@ class OrganizationsClient:
|
|
|
210
210
|
token="YOUR_TOKEN",
|
|
211
211
|
)
|
|
212
212
|
client.organizations.get_organization(
|
|
213
|
-
organization_id="
|
|
213
|
+
organization_id="string",
|
|
214
214
|
)
|
|
215
215
|
"""
|
|
216
216
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -236,7 +236,7 @@ class OrganizationsClient:
|
|
|
236
236
|
Parameters:
|
|
237
237
|
- organization_id: str.
|
|
238
238
|
|
|
239
|
-
- name: typing.Optional[str].
|
|
239
|
+
- name: typing.Optional[str].
|
|
240
240
|
---
|
|
241
241
|
from llama_cloud.client import LlamaCloud
|
|
242
242
|
|
|
@@ -244,7 +244,7 @@ class OrganizationsClient:
|
|
|
244
244
|
token="YOUR_TOKEN",
|
|
245
245
|
)
|
|
246
246
|
client.organizations.update_organization(
|
|
247
|
-
organization_id="
|
|
247
|
+
organization_id="string",
|
|
248
248
|
)
|
|
249
249
|
"""
|
|
250
250
|
_request: typing.Dict[str, typing.Any] = {}
|
|
@@ -280,7 +280,7 @@ class OrganizationsClient:
|
|
|
280
280
|
token="YOUR_TOKEN",
|
|
281
281
|
)
|
|
282
282
|
client.organizations.delete_organization(
|
|
283
|
-
organization_id="
|
|
283
|
+
organization_id="string",
|
|
284
284
|
)
|
|
285
285
|
"""
|
|
286
286
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -344,7 +344,7 @@ class OrganizationsClient:
|
|
|
344
344
|
token="YOUR_TOKEN",
|
|
345
345
|
)
|
|
346
346
|
client.organizations.list_organization_users(
|
|
347
|
-
organization_id="
|
|
347
|
+
organization_id="string",
|
|
348
348
|
)
|
|
349
349
|
"""
|
|
350
350
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -376,15 +376,14 @@ class OrganizationsClient:
|
|
|
376
376
|
|
|
377
377
|
- request: typing.List[UserOrganizationCreate].
|
|
378
378
|
---
|
|
379
|
-
from llama_cloud import UserOrganizationCreate
|
|
380
379
|
from llama_cloud.client import LlamaCloud
|
|
381
380
|
|
|
382
381
|
client = LlamaCloud(
|
|
383
382
|
token="YOUR_TOKEN",
|
|
384
383
|
)
|
|
385
384
|
client.organizations.add_users_to_organization(
|
|
386
|
-
organization_id="
|
|
387
|
-
request=[
|
|
385
|
+
organization_id="string",
|
|
386
|
+
request=[],
|
|
388
387
|
)
|
|
389
388
|
"""
|
|
390
389
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -421,8 +420,8 @@ class OrganizationsClient:
|
|
|
421
420
|
token="YOUR_TOKEN",
|
|
422
421
|
)
|
|
423
422
|
client.organizations.remove_users_from_organization(
|
|
424
|
-
organization_id="
|
|
425
|
-
member_user_id="
|
|
423
|
+
organization_id="string",
|
|
424
|
+
member_user_id="string",
|
|
426
425
|
)
|
|
427
426
|
"""
|
|
428
427
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -455,15 +454,14 @@ class OrganizationsClient:
|
|
|
455
454
|
|
|
456
455
|
- request: typing.List[UserOrganizationDelete].
|
|
457
456
|
---
|
|
458
|
-
from llama_cloud import UserOrganizationDelete
|
|
459
457
|
from llama_cloud.client import LlamaCloud
|
|
460
458
|
|
|
461
459
|
client = LlamaCloud(
|
|
462
460
|
token="YOUR_TOKEN",
|
|
463
461
|
)
|
|
464
462
|
client.organizations.batch_remove_users_from_organization(
|
|
465
|
-
organization_id="
|
|
466
|
-
request=[
|
|
463
|
+
organization_id="string",
|
|
464
|
+
request=[],
|
|
467
465
|
)
|
|
468
466
|
"""
|
|
469
467
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -498,7 +496,7 @@ class OrganizationsClient:
|
|
|
498
496
|
token="YOUR_TOKEN",
|
|
499
497
|
)
|
|
500
498
|
client.organizations.list_roles(
|
|
501
|
-
organization_id="
|
|
499
|
+
organization_id="string",
|
|
502
500
|
)
|
|
503
501
|
"""
|
|
504
502
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -519,7 +517,7 @@ class OrganizationsClient:
|
|
|
519
517
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
520
518
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
521
519
|
|
|
522
|
-
def get_user_role(self, organization_id: str) -> UserOrganizationRole:
|
|
520
|
+
def get_user_role(self, organization_id: str) -> typing.Optional[UserOrganizationRole]:
|
|
523
521
|
"""
|
|
524
522
|
Get the role of a user in an organization.
|
|
525
523
|
|
|
@@ -532,7 +530,7 @@ class OrganizationsClient:
|
|
|
532
530
|
token="YOUR_TOKEN",
|
|
533
531
|
)
|
|
534
532
|
client.organizations.get_user_role(
|
|
535
|
-
organization_id="
|
|
533
|
+
organization_id="string",
|
|
536
534
|
)
|
|
537
535
|
"""
|
|
538
536
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -544,7 +542,7 @@ class OrganizationsClient:
|
|
|
544
542
|
timeout=60,
|
|
545
543
|
)
|
|
546
544
|
if 200 <= _response.status_code < 300:
|
|
547
|
-
return pydantic.parse_obj_as(UserOrganizationRole, _response.json()) # type: ignore
|
|
545
|
+
return pydantic.parse_obj_as(typing.Optional[UserOrganizationRole], _response.json()) # type: ignore
|
|
548
546
|
if _response.status_code == 422:
|
|
549
547
|
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
550
548
|
try:
|
|
@@ -574,10 +572,10 @@ class OrganizationsClient:
|
|
|
574
572
|
token="YOUR_TOKEN",
|
|
575
573
|
)
|
|
576
574
|
client.organizations.assign_role_to_user_in_organization(
|
|
577
|
-
organization_id="
|
|
578
|
-
user_id="
|
|
579
|
-
user_organization_role_create_organization_id="
|
|
580
|
-
role_id="
|
|
575
|
+
organization_id="string",
|
|
576
|
+
user_id="string",
|
|
577
|
+
user_organization_role_create_organization_id="string",
|
|
578
|
+
role_id="string",
|
|
581
579
|
)
|
|
582
580
|
"""
|
|
583
581
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -620,8 +618,8 @@ class OrganizationsClient:
|
|
|
620
618
|
token="YOUR_TOKEN",
|
|
621
619
|
)
|
|
622
620
|
client.organizations.list_projects_by_user(
|
|
623
|
-
organization_id="
|
|
624
|
-
user_id="
|
|
621
|
+
organization_id="string",
|
|
622
|
+
user_id="string",
|
|
625
623
|
)
|
|
626
624
|
"""
|
|
627
625
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -643,16 +641,18 @@ class OrganizationsClient:
|
|
|
643
641
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
644
642
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
645
643
|
|
|
646
|
-
def add_user_to_project(
|
|
644
|
+
def add_user_to_project(
|
|
645
|
+
self, organization_id: typing.Optional[str], user_id: str, *, project_id: typing.Optional[str] = None
|
|
646
|
+
) -> typing.Any:
|
|
647
647
|
"""
|
|
648
648
|
Add a user to a project.
|
|
649
649
|
|
|
650
650
|
Parameters:
|
|
651
|
-
- organization_id: str.
|
|
651
|
+
- organization_id: typing.Optional[str].
|
|
652
652
|
|
|
653
653
|
- user_id: str.
|
|
654
654
|
|
|
655
|
-
- project_id: str.
|
|
655
|
+
- project_id: typing.Optional[str].
|
|
656
656
|
---
|
|
657
657
|
from llama_cloud.client import LlamaCloud
|
|
658
658
|
|
|
@@ -660,9 +660,7 @@ class OrganizationsClient:
|
|
|
660
660
|
token="YOUR_TOKEN",
|
|
661
661
|
)
|
|
662
662
|
client.organizations.add_user_to_project(
|
|
663
|
-
|
|
664
|
-
user_id="user_id",
|
|
665
|
-
project_id="project_id",
|
|
663
|
+
user_id="string",
|
|
666
664
|
)
|
|
667
665
|
"""
|
|
668
666
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -702,9 +700,9 @@ class OrganizationsClient:
|
|
|
702
700
|
token="YOUR_TOKEN",
|
|
703
701
|
)
|
|
704
702
|
client.organizations.remove_user_from_project(
|
|
705
|
-
organization_id="
|
|
706
|
-
user_id="
|
|
707
|
-
project_id="
|
|
703
|
+
organization_id="string",
|
|
704
|
+
user_id="string",
|
|
705
|
+
project_id="string",
|
|
708
706
|
)
|
|
709
707
|
"""
|
|
710
708
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -774,7 +772,7 @@ class AsyncOrganizationsClient:
|
|
|
774
772
|
)
|
|
775
773
|
await client.organizations.create_organization(
|
|
776
774
|
request=OrganizationCreate(
|
|
777
|
-
name="
|
|
775
|
+
name="string",
|
|
778
776
|
),
|
|
779
777
|
)
|
|
780
778
|
"""
|
|
@@ -810,7 +808,7 @@ class AsyncOrganizationsClient:
|
|
|
810
808
|
)
|
|
811
809
|
await client.organizations.upsert_organization(
|
|
812
810
|
request=OrganizationCreate(
|
|
813
|
-
name="
|
|
811
|
+
name="string",
|
|
814
812
|
),
|
|
815
813
|
)
|
|
816
814
|
"""
|
|
@@ -872,7 +870,7 @@ class AsyncOrganizationsClient:
|
|
|
872
870
|
token="YOUR_TOKEN",
|
|
873
871
|
)
|
|
874
872
|
await client.organizations.set_default_organization(
|
|
875
|
-
organization_id="
|
|
873
|
+
organization_id="string",
|
|
876
874
|
)
|
|
877
875
|
"""
|
|
878
876
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -905,7 +903,7 @@ class AsyncOrganizationsClient:
|
|
|
905
903
|
token="YOUR_TOKEN",
|
|
906
904
|
)
|
|
907
905
|
await client.organizations.get_organization(
|
|
908
|
-
organization_id="
|
|
906
|
+
organization_id="string",
|
|
909
907
|
)
|
|
910
908
|
"""
|
|
911
909
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -931,7 +929,7 @@ class AsyncOrganizationsClient:
|
|
|
931
929
|
Parameters:
|
|
932
930
|
- organization_id: str.
|
|
933
931
|
|
|
934
|
-
- name: typing.Optional[str].
|
|
932
|
+
- name: typing.Optional[str].
|
|
935
933
|
---
|
|
936
934
|
from llama_cloud.client import AsyncLlamaCloud
|
|
937
935
|
|
|
@@ -939,7 +937,7 @@ class AsyncOrganizationsClient:
|
|
|
939
937
|
token="YOUR_TOKEN",
|
|
940
938
|
)
|
|
941
939
|
await client.organizations.update_organization(
|
|
942
|
-
organization_id="
|
|
940
|
+
organization_id="string",
|
|
943
941
|
)
|
|
944
942
|
"""
|
|
945
943
|
_request: typing.Dict[str, typing.Any] = {}
|
|
@@ -975,7 +973,7 @@ class AsyncOrganizationsClient:
|
|
|
975
973
|
token="YOUR_TOKEN",
|
|
976
974
|
)
|
|
977
975
|
await client.organizations.delete_organization(
|
|
978
|
-
organization_id="
|
|
976
|
+
organization_id="string",
|
|
979
977
|
)
|
|
980
978
|
"""
|
|
981
979
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1039,7 +1037,7 @@ class AsyncOrganizationsClient:
|
|
|
1039
1037
|
token="YOUR_TOKEN",
|
|
1040
1038
|
)
|
|
1041
1039
|
await client.organizations.list_organization_users(
|
|
1042
|
-
organization_id="
|
|
1040
|
+
organization_id="string",
|
|
1043
1041
|
)
|
|
1044
1042
|
"""
|
|
1045
1043
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1071,15 +1069,14 @@ class AsyncOrganizationsClient:
|
|
|
1071
1069
|
|
|
1072
1070
|
- request: typing.List[UserOrganizationCreate].
|
|
1073
1071
|
---
|
|
1074
|
-
from llama_cloud import UserOrganizationCreate
|
|
1075
1072
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1076
1073
|
|
|
1077
1074
|
client = AsyncLlamaCloud(
|
|
1078
1075
|
token="YOUR_TOKEN",
|
|
1079
1076
|
)
|
|
1080
1077
|
await client.organizations.add_users_to_organization(
|
|
1081
|
-
organization_id="
|
|
1082
|
-
request=[
|
|
1078
|
+
organization_id="string",
|
|
1079
|
+
request=[],
|
|
1083
1080
|
)
|
|
1084
1081
|
"""
|
|
1085
1082
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1116,8 +1113,8 @@ class AsyncOrganizationsClient:
|
|
|
1116
1113
|
token="YOUR_TOKEN",
|
|
1117
1114
|
)
|
|
1118
1115
|
await client.organizations.remove_users_from_organization(
|
|
1119
|
-
organization_id="
|
|
1120
|
-
member_user_id="
|
|
1116
|
+
organization_id="string",
|
|
1117
|
+
member_user_id="string",
|
|
1121
1118
|
)
|
|
1122
1119
|
"""
|
|
1123
1120
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1150,15 +1147,14 @@ class AsyncOrganizationsClient:
|
|
|
1150
1147
|
|
|
1151
1148
|
- request: typing.List[UserOrganizationDelete].
|
|
1152
1149
|
---
|
|
1153
|
-
from llama_cloud import UserOrganizationDelete
|
|
1154
1150
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1155
1151
|
|
|
1156
1152
|
client = AsyncLlamaCloud(
|
|
1157
1153
|
token="YOUR_TOKEN",
|
|
1158
1154
|
)
|
|
1159
1155
|
await client.organizations.batch_remove_users_from_organization(
|
|
1160
|
-
organization_id="
|
|
1161
|
-
request=[
|
|
1156
|
+
organization_id="string",
|
|
1157
|
+
request=[],
|
|
1162
1158
|
)
|
|
1163
1159
|
"""
|
|
1164
1160
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1193,7 +1189,7 @@ class AsyncOrganizationsClient:
|
|
|
1193
1189
|
token="YOUR_TOKEN",
|
|
1194
1190
|
)
|
|
1195
1191
|
await client.organizations.list_roles(
|
|
1196
|
-
organization_id="
|
|
1192
|
+
organization_id="string",
|
|
1197
1193
|
)
|
|
1198
1194
|
"""
|
|
1199
1195
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1214,7 +1210,7 @@ class AsyncOrganizationsClient:
|
|
|
1214
1210
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1215
1211
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1216
1212
|
|
|
1217
|
-
async def get_user_role(self, organization_id: str) -> UserOrganizationRole:
|
|
1213
|
+
async def get_user_role(self, organization_id: str) -> typing.Optional[UserOrganizationRole]:
|
|
1218
1214
|
"""
|
|
1219
1215
|
Get the role of a user in an organization.
|
|
1220
1216
|
|
|
@@ -1227,7 +1223,7 @@ class AsyncOrganizationsClient:
|
|
|
1227
1223
|
token="YOUR_TOKEN",
|
|
1228
1224
|
)
|
|
1229
1225
|
await client.organizations.get_user_role(
|
|
1230
|
-
organization_id="
|
|
1226
|
+
organization_id="string",
|
|
1231
1227
|
)
|
|
1232
1228
|
"""
|
|
1233
1229
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1239,7 +1235,7 @@ class AsyncOrganizationsClient:
|
|
|
1239
1235
|
timeout=60,
|
|
1240
1236
|
)
|
|
1241
1237
|
if 200 <= _response.status_code < 300:
|
|
1242
|
-
return pydantic.parse_obj_as(UserOrganizationRole, _response.json()) # type: ignore
|
|
1238
|
+
return pydantic.parse_obj_as(typing.Optional[UserOrganizationRole], _response.json()) # type: ignore
|
|
1243
1239
|
if _response.status_code == 422:
|
|
1244
1240
|
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
1245
1241
|
try:
|
|
@@ -1269,10 +1265,10 @@ class AsyncOrganizationsClient:
|
|
|
1269
1265
|
token="YOUR_TOKEN",
|
|
1270
1266
|
)
|
|
1271
1267
|
await client.organizations.assign_role_to_user_in_organization(
|
|
1272
|
-
organization_id="
|
|
1273
|
-
user_id="
|
|
1274
|
-
user_organization_role_create_organization_id="
|
|
1275
|
-
role_id="
|
|
1268
|
+
organization_id="string",
|
|
1269
|
+
user_id="string",
|
|
1270
|
+
user_organization_role_create_organization_id="string",
|
|
1271
|
+
role_id="string",
|
|
1276
1272
|
)
|
|
1277
1273
|
"""
|
|
1278
1274
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1315,8 +1311,8 @@ class AsyncOrganizationsClient:
|
|
|
1315
1311
|
token="YOUR_TOKEN",
|
|
1316
1312
|
)
|
|
1317
1313
|
await client.organizations.list_projects_by_user(
|
|
1318
|
-
organization_id="
|
|
1319
|
-
user_id="
|
|
1314
|
+
organization_id="string",
|
|
1315
|
+
user_id="string",
|
|
1320
1316
|
)
|
|
1321
1317
|
"""
|
|
1322
1318
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1338,16 +1334,18 @@ class AsyncOrganizationsClient:
|
|
|
1338
1334
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1339
1335
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1340
1336
|
|
|
1341
|
-
async def add_user_to_project(
|
|
1337
|
+
async def add_user_to_project(
|
|
1338
|
+
self, organization_id: typing.Optional[str], user_id: str, *, project_id: typing.Optional[str] = None
|
|
1339
|
+
) -> typing.Any:
|
|
1342
1340
|
"""
|
|
1343
1341
|
Add a user to a project.
|
|
1344
1342
|
|
|
1345
1343
|
Parameters:
|
|
1346
|
-
- organization_id: str.
|
|
1344
|
+
- organization_id: typing.Optional[str].
|
|
1347
1345
|
|
|
1348
1346
|
- user_id: str.
|
|
1349
1347
|
|
|
1350
|
-
- project_id: str.
|
|
1348
|
+
- project_id: typing.Optional[str].
|
|
1351
1349
|
---
|
|
1352
1350
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1353
1351
|
|
|
@@ -1355,9 +1353,7 @@ class AsyncOrganizationsClient:
|
|
|
1355
1353
|
token="YOUR_TOKEN",
|
|
1356
1354
|
)
|
|
1357
1355
|
await client.organizations.add_user_to_project(
|
|
1358
|
-
|
|
1359
|
-
user_id="user_id",
|
|
1360
|
-
project_id="project_id",
|
|
1356
|
+
user_id="string",
|
|
1361
1357
|
)
|
|
1362
1358
|
"""
|
|
1363
1359
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1397,9 +1393,9 @@ class AsyncOrganizationsClient:
|
|
|
1397
1393
|
token="YOUR_TOKEN",
|
|
1398
1394
|
)
|
|
1399
1395
|
await client.organizations.remove_user_from_project(
|
|
1400
|
-
organization_id="
|
|
1401
|
-
user_id="
|
|
1402
|
-
project_id="
|
|
1396
|
+
organization_id="string",
|
|
1397
|
+
user_id="string",
|
|
1398
|
+
project_id="string",
|
|
1403
1399
|
)
|
|
1404
1400
|
"""
|
|
1405
1401
|
_response = await self._client_wrapper.httpx_client.request(
|