llama-cloud 0.1.5__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 +138 -2
- llama_cloud/client.py +15 -0
- llama_cloud/resources/__init__.py +17 -1
- llama_cloud/resources/chat_apps/__init__.py +2 -0
- llama_cloud/resources/chat_apps/client.py +620 -0
- llama_cloud/resources/data_sinks/client.py +2 -2
- llama_cloud/resources/data_sources/client.py +2 -2
- llama_cloud/resources/embedding_model_configs/client.py +4 -4
- llama_cloud/resources/files/__init__.py +2 -2
- llama_cloud/resources/files/client.py +21 -0
- llama_cloud/resources/files/types/__init__.py +2 -1
- llama_cloud/resources/files/types/file_create_permission_info_value.py +7 -0
- 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 +14 -14
- llama_cloud/resources/parsing/client.py +480 -229
- llama_cloud/resources/pipelines/client.py +182 -126
- llama_cloud/resources/projects/client.py +210 -102
- 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 +124 -2
- llama_cloud/types/{chat_message.py → app_schema_chat_chat_message.py} +2 -2
- 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 +1 -0
- llama_cloud/types/cloud_box_data_source.py +1 -0
- llama_cloud/types/cloud_confluence_data_source.py +1 -0
- llama_cloud/types/cloud_google_drive_data_source.py +1 -0
- llama_cloud/types/cloud_jira_data_source.py +1 -0
- llama_cloud/types/cloud_notion_page_data_source.py +1 -0
- llama_cloud/types/cloud_one_drive_data_source.py +1 -0
- llama_cloud/types/cloud_postgres_vector_store.py +1 -0
- llama_cloud/types/cloud_s_3_data_source.py +1 -0
- llama_cloud/types/cloud_sharepoint_data_source.py +1 -0
- llama_cloud/types/cloud_slack_data_source.py +1 -0
- 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 +1 -1
- llama_cloud/types/data_sink_create.py +1 -1
- llama_cloud/types/data_source.py +1 -1
- llama_cloud/types/data_source_create.py +1 -1
- llama_cloud/types/edit_suggestion.py +39 -0
- llama_cloud/types/eval_dataset_job_record.py +1 -0
- 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/file.py +3 -0
- llama_cloud/types/file_permission_info_value.py +5 -0
- llama_cloud/types/filter_condition.py +9 -1
- llama_cloud/types/filter_operator.py +4 -0
- llama_cloud/types/image_block.py +35 -0
- llama_cloud/types/input_message.py +1 -1
- llama_cloud/types/job_name_mapping.py +4 -0
- 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 +15 -0
- llama_cloud/types/llm.py +1 -0
- llama_cloud/types/llm_model_data.py +1 -0
- llama_cloud/types/llm_parameters.py +1 -0
- llama_cloud/types/managed_ingestion_status.py +4 -0
- llama_cloud/types/managed_ingestion_status_response.py +1 -0
- llama_cloud/types/object_type.py +4 -0
- llama_cloud/types/organization.py +5 -0
- 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/parsing_job_structured_result.py +32 -0
- llama_cloud/types/pipeline_create.py +3 -1
- llama_cloud/types/pipeline_data_source.py +1 -1
- llama_cloud/types/pipeline_file.py +3 -0
- llama_cloud/types/pipeline_file_permission_info_value.py +7 -0
- llama_cloud/types/playground_session.py +2 -2
- llama_cloud/types/preset_retrieval_params.py +1 -0
- llama_cloud/types/progress_event.py +44 -0
- llama_cloud/types/progress_event_status.py +33 -0
- llama_cloud/types/prompt_spec.py +2 -2
- 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/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 +13 -6
- llama_cloud/types/usage_metric_response.py +34 -0
- llama_cloud/types/user_job_record.py +32 -0
- {llama_cloud-0.1.5.dist-info → llama_cloud-0.1.7a1.dist-info}/METADATA +3 -1
- {llama_cloud-0.1.5.dist-info → llama_cloud-0.1.7a1.dist-info}/RECORD +129 -59
- {llama_cloud-0.1.5.dist-info → llama_cloud-0.1.7a1.dist-info}/WHEEL +1 -1
- {llama_cloud-0.1.5.dist-info → llama_cloud-0.1.7a1.dist-info}/LICENSE +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from .types import FileCreateFromUrlResourceInfoValue, FileCreateResourceInfoValue
|
|
3
|
+
from .types import FileCreateFromUrlResourceInfoValue, FileCreatePermissionInfoValue, FileCreateResourceInfoValue
|
|
4
4
|
|
|
5
|
-
__all__ = ["FileCreateFromUrlResourceInfoValue", "FileCreateResourceInfoValue"]
|
|
5
|
+
__all__ = ["FileCreateFromUrlResourceInfoValue", "FileCreatePermissionInfoValue", "FileCreateResourceInfoValue"]
|
|
@@ -15,6 +15,7 @@ from ...types.http_validation_error import HttpValidationError
|
|
|
15
15
|
from ...types.page_screenshot_metadata import PageScreenshotMetadata
|
|
16
16
|
from ...types.presigned_url import PresignedUrl
|
|
17
17
|
from .types.file_create_from_url_resource_info_value import FileCreateFromUrlResourceInfoValue
|
|
18
|
+
from .types.file_create_permission_info_value import FileCreatePermissionInfoValue
|
|
18
19
|
from .types.file_create_resource_info_value import FileCreateResourceInfoValue
|
|
19
20
|
|
|
20
21
|
try:
|
|
@@ -188,9 +189,11 @@ class FilesClient:
|
|
|
188
189
|
project_id: typing.Optional[str] = None,
|
|
189
190
|
organization_id: typing.Optional[str] = None,
|
|
190
191
|
name: str,
|
|
192
|
+
external_file_id: typing.Optional[str] = OMIT,
|
|
191
193
|
file_size: typing.Optional[int] = OMIT,
|
|
192
194
|
last_modified_at: typing.Optional[dt.datetime] = OMIT,
|
|
193
195
|
resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateResourceInfoValue]]] = OMIT,
|
|
196
|
+
permission_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreatePermissionInfoValue]]] = OMIT,
|
|
194
197
|
data_source_id: typing.Optional[str] = OMIT,
|
|
195
198
|
) -> PresignedUrl:
|
|
196
199
|
"""
|
|
@@ -203,12 +206,16 @@ class FilesClient:
|
|
|
203
206
|
|
|
204
207
|
- name: str.
|
|
205
208
|
|
|
209
|
+
- external_file_id: typing.Optional[str].
|
|
210
|
+
|
|
206
211
|
- file_size: typing.Optional[int].
|
|
207
212
|
|
|
208
213
|
- last_modified_at: typing.Optional[dt.datetime].
|
|
209
214
|
|
|
210
215
|
- resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateResourceInfoValue]]].
|
|
211
216
|
|
|
217
|
+
- permission_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreatePermissionInfoValue]]].
|
|
218
|
+
|
|
212
219
|
- data_source_id: typing.Optional[str].
|
|
213
220
|
---
|
|
214
221
|
from llama_cloud.client import LlamaCloud
|
|
@@ -221,12 +228,16 @@ class FilesClient:
|
|
|
221
228
|
)
|
|
222
229
|
"""
|
|
223
230
|
_request: typing.Dict[str, typing.Any] = {"name": name}
|
|
231
|
+
if external_file_id is not OMIT:
|
|
232
|
+
_request["external_file_id"] = external_file_id
|
|
224
233
|
if file_size is not OMIT:
|
|
225
234
|
_request["file_size"] = file_size
|
|
226
235
|
if last_modified_at is not OMIT:
|
|
227
236
|
_request["last_modified_at"] = last_modified_at
|
|
228
237
|
if resource_info is not OMIT:
|
|
229
238
|
_request["resource_info"] = resource_info
|
|
239
|
+
if permission_info is not OMIT:
|
|
240
|
+
_request["permission_info"] = permission_info
|
|
230
241
|
if data_source_id is not OMIT:
|
|
231
242
|
_request["data_source_id"] = data_source_id
|
|
232
243
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -644,9 +655,11 @@ class AsyncFilesClient:
|
|
|
644
655
|
project_id: typing.Optional[str] = None,
|
|
645
656
|
organization_id: typing.Optional[str] = None,
|
|
646
657
|
name: str,
|
|
658
|
+
external_file_id: typing.Optional[str] = OMIT,
|
|
647
659
|
file_size: typing.Optional[int] = OMIT,
|
|
648
660
|
last_modified_at: typing.Optional[dt.datetime] = OMIT,
|
|
649
661
|
resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateResourceInfoValue]]] = OMIT,
|
|
662
|
+
permission_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreatePermissionInfoValue]]] = OMIT,
|
|
650
663
|
data_source_id: typing.Optional[str] = OMIT,
|
|
651
664
|
) -> PresignedUrl:
|
|
652
665
|
"""
|
|
@@ -659,12 +672,16 @@ class AsyncFilesClient:
|
|
|
659
672
|
|
|
660
673
|
- name: str.
|
|
661
674
|
|
|
675
|
+
- external_file_id: typing.Optional[str].
|
|
676
|
+
|
|
662
677
|
- file_size: typing.Optional[int].
|
|
663
678
|
|
|
664
679
|
- last_modified_at: typing.Optional[dt.datetime].
|
|
665
680
|
|
|
666
681
|
- resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateResourceInfoValue]]].
|
|
667
682
|
|
|
683
|
+
- permission_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreatePermissionInfoValue]]].
|
|
684
|
+
|
|
668
685
|
- data_source_id: typing.Optional[str].
|
|
669
686
|
---
|
|
670
687
|
from llama_cloud.client import AsyncLlamaCloud
|
|
@@ -677,12 +694,16 @@ class AsyncFilesClient:
|
|
|
677
694
|
)
|
|
678
695
|
"""
|
|
679
696
|
_request: typing.Dict[str, typing.Any] = {"name": name}
|
|
697
|
+
if external_file_id is not OMIT:
|
|
698
|
+
_request["external_file_id"] = external_file_id
|
|
680
699
|
if file_size is not OMIT:
|
|
681
700
|
_request["file_size"] = file_size
|
|
682
701
|
if last_modified_at is not OMIT:
|
|
683
702
|
_request["last_modified_at"] = last_modified_at
|
|
684
703
|
if resource_info is not OMIT:
|
|
685
704
|
_request["resource_info"] = resource_info
|
|
705
|
+
if permission_info is not OMIT:
|
|
706
|
+
_request["permission_info"] = permission_info
|
|
686
707
|
if data_source_id is not OMIT:
|
|
687
708
|
_request["data_source_id"] = data_source_id
|
|
688
709
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from .file_create_from_url_resource_info_value import FileCreateFromUrlResourceInfoValue
|
|
4
|
+
from .file_create_permission_info_value import FileCreatePermissionInfoValue
|
|
4
5
|
from .file_create_resource_info_value import FileCreateResourceInfoValue
|
|
5
6
|
|
|
6
|
-
__all__ = ["FileCreateFromUrlResourceInfoValue", "FileCreateResourceInfoValue"]
|
|
7
|
+
__all__ = ["FileCreateFromUrlResourceInfoValue", "FileCreatePermissionInfoValue", "FileCreateResourceInfoValue"]
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
import urllib.parse
|
|
5
|
+
from json.decoder import JSONDecodeError
|
|
6
|
+
|
|
7
|
+
from ...core.api_error import ApiError
|
|
8
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
9
|
+
from ...core.remove_none_from_dict import remove_none_from_dict
|
|
10
|
+
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
11
|
+
from ...types.http_validation_error import HttpValidationError
|
|
12
|
+
from ...types.paginated_jobs_history_with_metrics import PaginatedJobsHistoryWithMetrics
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
import pydantic
|
|
16
|
+
if pydantic.__version__.startswith("1."):
|
|
17
|
+
raise ImportError
|
|
18
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
19
|
+
except ImportError:
|
|
20
|
+
import pydantic # type: ignore
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class JobsClient:
|
|
24
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
25
|
+
self._client_wrapper = client_wrapper
|
|
26
|
+
|
|
27
|
+
def get_jobs_api_v_1_jobs_get(
|
|
28
|
+
self,
|
|
29
|
+
*,
|
|
30
|
+
job_name: typing.Optional[str] = None,
|
|
31
|
+
limit: typing.Optional[int] = None,
|
|
32
|
+
offset: typing.Optional[int] = None,
|
|
33
|
+
include_usage_metrics: typing.Optional[bool] = None,
|
|
34
|
+
project_id: typing.Optional[str] = None,
|
|
35
|
+
organization_id: typing.Optional[str] = None,
|
|
36
|
+
) -> PaginatedJobsHistoryWithMetrics:
|
|
37
|
+
"""
|
|
38
|
+
Get jobs for a project.
|
|
39
|
+
|
|
40
|
+
Parameters:
|
|
41
|
+
- job_name: typing.Optional[str].
|
|
42
|
+
|
|
43
|
+
- limit: typing.Optional[int].
|
|
44
|
+
|
|
45
|
+
- offset: typing.Optional[int].
|
|
46
|
+
|
|
47
|
+
- include_usage_metrics: typing.Optional[bool].
|
|
48
|
+
|
|
49
|
+
- project_id: typing.Optional[str].
|
|
50
|
+
|
|
51
|
+
- organization_id: typing.Optional[str].
|
|
52
|
+
---
|
|
53
|
+
from llama_cloud.client import LlamaCloud
|
|
54
|
+
|
|
55
|
+
client = LlamaCloud(
|
|
56
|
+
token="YOUR_TOKEN",
|
|
57
|
+
)
|
|
58
|
+
client.jobs.get_jobs_api_v_1_jobs_get()
|
|
59
|
+
"""
|
|
60
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
61
|
+
"GET",
|
|
62
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/jobs"),
|
|
63
|
+
params=remove_none_from_dict(
|
|
64
|
+
{
|
|
65
|
+
"job_name": job_name,
|
|
66
|
+
"limit": limit,
|
|
67
|
+
"offset": offset,
|
|
68
|
+
"include_usage_metrics": include_usage_metrics,
|
|
69
|
+
"project_id": project_id,
|
|
70
|
+
"organization_id": organization_id,
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
headers=self._client_wrapper.get_headers(),
|
|
74
|
+
timeout=60,
|
|
75
|
+
)
|
|
76
|
+
if 200 <= _response.status_code < 300:
|
|
77
|
+
return pydantic.parse_obj_as(PaginatedJobsHistoryWithMetrics, _response.json()) # type: ignore
|
|
78
|
+
if _response.status_code == 422:
|
|
79
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
80
|
+
try:
|
|
81
|
+
_response_json = _response.json()
|
|
82
|
+
except JSONDecodeError:
|
|
83
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
84
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class AsyncJobsClient:
|
|
88
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
89
|
+
self._client_wrapper = client_wrapper
|
|
90
|
+
|
|
91
|
+
async def get_jobs_api_v_1_jobs_get(
|
|
92
|
+
self,
|
|
93
|
+
*,
|
|
94
|
+
job_name: typing.Optional[str] = None,
|
|
95
|
+
limit: typing.Optional[int] = None,
|
|
96
|
+
offset: typing.Optional[int] = None,
|
|
97
|
+
include_usage_metrics: typing.Optional[bool] = None,
|
|
98
|
+
project_id: typing.Optional[str] = None,
|
|
99
|
+
organization_id: typing.Optional[str] = None,
|
|
100
|
+
) -> PaginatedJobsHistoryWithMetrics:
|
|
101
|
+
"""
|
|
102
|
+
Get jobs for a project.
|
|
103
|
+
|
|
104
|
+
Parameters:
|
|
105
|
+
- job_name: typing.Optional[str].
|
|
106
|
+
|
|
107
|
+
- limit: typing.Optional[int].
|
|
108
|
+
|
|
109
|
+
- offset: typing.Optional[int].
|
|
110
|
+
|
|
111
|
+
- include_usage_metrics: typing.Optional[bool].
|
|
112
|
+
|
|
113
|
+
- project_id: typing.Optional[str].
|
|
114
|
+
|
|
115
|
+
- organization_id: typing.Optional[str].
|
|
116
|
+
---
|
|
117
|
+
from llama_cloud.client import AsyncLlamaCloud
|
|
118
|
+
|
|
119
|
+
client = AsyncLlamaCloud(
|
|
120
|
+
token="YOUR_TOKEN",
|
|
121
|
+
)
|
|
122
|
+
await client.jobs.get_jobs_api_v_1_jobs_get()
|
|
123
|
+
"""
|
|
124
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
125
|
+
"GET",
|
|
126
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/jobs"),
|
|
127
|
+
params=remove_none_from_dict(
|
|
128
|
+
{
|
|
129
|
+
"job_name": job_name,
|
|
130
|
+
"limit": limit,
|
|
131
|
+
"offset": offset,
|
|
132
|
+
"include_usage_metrics": include_usage_metrics,
|
|
133
|
+
"project_id": project_id,
|
|
134
|
+
"organization_id": organization_id,
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
headers=self._client_wrapper.get_headers(),
|
|
138
|
+
timeout=60,
|
|
139
|
+
)
|
|
140
|
+
if 200 <= _response.status_code < 300:
|
|
141
|
+
return pydantic.parse_obj_as(PaginatedJobsHistoryWithMetrics, _response.json()) # type: ignore
|
|
142
|
+
if _response.status_code == 422:
|
|
143
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
144
|
+
try:
|
|
145
|
+
_response_json = _response.json()
|
|
146
|
+
except JSONDecodeError:
|
|
147
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
148
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|