llama-cloud 0.1.8__py3-none-any.whl → 0.1.9__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 +4 -16
- llama_cloud/client.py +0 -3
- llama_cloud/resources/__init__.py +0 -5
- llama_cloud/resources/files/client.py +34 -6
- llama_cloud/resources/llama_extract/client.py +126 -424
- llama_cloud/resources/parsing/client.py +82 -18
- llama_cloud/types/__init__.py +4 -10
- llama_cloud/types/extract_job.py +3 -1
- llama_cloud/types/extract_resultset.py +2 -6
- llama_cloud/types/extract_run.py +5 -0
- llama_cloud/types/extract_run_data_value.py +5 -0
- llama_cloud/types/{extraction_schema_data_schema_value.py → extract_run_extraction_metadata_value.py} +1 -1
- llama_cloud/types/extract_state.py +4 -4
- llama_cloud/types/llama_parse_parameters.py +3 -0
- {llama_cloud-0.1.8.dist-info → llama_cloud-0.1.9.dist-info}/METADATA +2 -1
- {llama_cloud-0.1.8.dist-info → llama_cloud-0.1.9.dist-info}/RECORD +18 -26
- {llama_cloud-0.1.8.dist-info → llama_cloud-0.1.9.dist-info}/WHEEL +1 -1
- llama_cloud/resources/extraction/__init__.py +0 -5
- llama_cloud/resources/extraction/client.py +0 -756
- llama_cloud/resources/extraction/types/__init__.py +0 -6
- llama_cloud/resources/extraction/types/extraction_schema_create_data_schema_value.py +0 -7
- llama_cloud/resources/extraction/types/extraction_schema_update_data_schema_value.py +0 -7
- llama_cloud/types/extraction_job.py +0 -35
- llama_cloud/types/extraction_result.py +0 -44
- llama_cloud/types/extraction_result_data_value.py +0 -5
- llama_cloud/types/extraction_schema.py +0 -41
- {llama_cloud-0.1.8.dist-info → llama_cloud-0.1.9.dist-info}/LICENSE +0 -0
llama_cloud/__init__.py
CHANGED
|
@@ -112,12 +112,9 @@ from .types import (
|
|
|
112
112
|
ExtractResultsetExtractionMetadataValue,
|
|
113
113
|
ExtractRun,
|
|
114
114
|
ExtractRunDataSchemaValue,
|
|
115
|
+
ExtractRunDataValue,
|
|
116
|
+
ExtractRunExtractionMetadataValue,
|
|
115
117
|
ExtractState,
|
|
116
|
-
ExtractionJob,
|
|
117
|
-
ExtractionResult,
|
|
118
|
-
ExtractionResultDataValue,
|
|
119
|
-
ExtractionSchema,
|
|
120
|
-
ExtractionSchemaDataSchemaValue,
|
|
121
118
|
File,
|
|
122
119
|
FilePermissionInfoValue,
|
|
123
120
|
FileResourceInfoValue,
|
|
@@ -304,8 +301,6 @@ from .resources import (
|
|
|
304
301
|
EmbeddingModelConfigCreateEmbeddingConfig_VertexaiEmbedding,
|
|
305
302
|
ExtractAgentCreateDataSchemaValue,
|
|
306
303
|
ExtractAgentUpdateDataSchemaValue,
|
|
307
|
-
ExtractionSchemaCreateDataSchemaValue,
|
|
308
|
-
ExtractionSchemaUpdateDataSchemaValue,
|
|
309
304
|
FileCreateFromUrlResourceInfoValue,
|
|
310
305
|
FileCreatePermissionInfoValue,
|
|
311
306
|
FileCreateResourceInfoValue,
|
|
@@ -326,7 +321,6 @@ from .resources import (
|
|
|
326
321
|
data_sources,
|
|
327
322
|
embedding_model_configs,
|
|
328
323
|
evals,
|
|
329
|
-
extraction,
|
|
330
324
|
files,
|
|
331
325
|
jobs,
|
|
332
326
|
llama_extract,
|
|
@@ -464,14 +458,9 @@ __all__ = [
|
|
|
464
458
|
"ExtractResultsetExtractionMetadataValue",
|
|
465
459
|
"ExtractRun",
|
|
466
460
|
"ExtractRunDataSchemaValue",
|
|
461
|
+
"ExtractRunDataValue",
|
|
462
|
+
"ExtractRunExtractionMetadataValue",
|
|
467
463
|
"ExtractState",
|
|
468
|
-
"ExtractionJob",
|
|
469
|
-
"ExtractionResult",
|
|
470
|
-
"ExtractionResultDataValue",
|
|
471
|
-
"ExtractionSchema",
|
|
472
|
-
"ExtractionSchemaCreateDataSchemaValue",
|
|
473
|
-
"ExtractionSchemaDataSchemaValue",
|
|
474
|
-
"ExtractionSchemaUpdateDataSchemaValue",
|
|
475
464
|
"File",
|
|
476
465
|
"FileCreateFromUrlResourceInfoValue",
|
|
477
466
|
"FileCreatePermissionInfoValue",
|
|
@@ -664,7 +653,6 @@ __all__ = [
|
|
|
664
653
|
"data_sources",
|
|
665
654
|
"embedding_model_configs",
|
|
666
655
|
"evals",
|
|
667
|
-
"extraction",
|
|
668
656
|
"files",
|
|
669
657
|
"jobs",
|
|
670
658
|
"llama_extract",
|
llama_cloud/client.py
CHANGED
|
@@ -12,7 +12,6 @@ from .resources.data_sinks.client import AsyncDataSinksClient, DataSinksClient
|
|
|
12
12
|
from .resources.data_sources.client import AsyncDataSourcesClient, DataSourcesClient
|
|
13
13
|
from .resources.embedding_model_configs.client import AsyncEmbeddingModelConfigsClient, EmbeddingModelConfigsClient
|
|
14
14
|
from .resources.evals.client import AsyncEvalsClient, EvalsClient
|
|
15
|
-
from .resources.extraction.client import AsyncExtractionClient, ExtractionClient
|
|
16
15
|
from .resources.files.client import AsyncFilesClient, FilesClient
|
|
17
16
|
from .resources.jobs.client import AsyncJobsClient, JobsClient
|
|
18
17
|
from .resources.llama_extract.client import AsyncLlamaExtractClient, LlamaExtractClient
|
|
@@ -52,7 +51,6 @@ class LlamaCloud:
|
|
|
52
51
|
self.parsing = ParsingClient(client_wrapper=self._client_wrapper)
|
|
53
52
|
self.component_definitions = ComponentDefinitionsClient(client_wrapper=self._client_wrapper)
|
|
54
53
|
self.chat_apps = ChatAppsClient(client_wrapper=self._client_wrapper)
|
|
55
|
-
self.extraction = ExtractionClient(client_wrapper=self._client_wrapper)
|
|
56
54
|
self.llama_extract = LlamaExtractClient(client_wrapper=self._client_wrapper)
|
|
57
55
|
self.reports = ReportsClient(client_wrapper=self._client_wrapper)
|
|
58
56
|
|
|
@@ -85,7 +83,6 @@ class AsyncLlamaCloud:
|
|
|
85
83
|
self.parsing = AsyncParsingClient(client_wrapper=self._client_wrapper)
|
|
86
84
|
self.component_definitions = AsyncComponentDefinitionsClient(client_wrapper=self._client_wrapper)
|
|
87
85
|
self.chat_apps = AsyncChatAppsClient(client_wrapper=self._client_wrapper)
|
|
88
|
-
self.extraction = AsyncExtractionClient(client_wrapper=self._client_wrapper)
|
|
89
86
|
self.llama_extract = AsyncLlamaExtractClient(client_wrapper=self._client_wrapper)
|
|
90
87
|
self.reports = AsyncReportsClient(client_wrapper=self._client_wrapper)
|
|
91
88
|
|
|
@@ -7,7 +7,6 @@ from . import (
|
|
|
7
7
|
data_sources,
|
|
8
8
|
embedding_model_configs,
|
|
9
9
|
evals,
|
|
10
|
-
extraction,
|
|
11
10
|
files,
|
|
12
11
|
jobs,
|
|
13
12
|
llama_extract,
|
|
@@ -30,7 +29,6 @@ from .embedding_model_configs import (
|
|
|
30
29
|
EmbeddingModelConfigCreateEmbeddingConfig_OpenaiEmbedding,
|
|
31
30
|
EmbeddingModelConfigCreateEmbeddingConfig_VertexaiEmbedding,
|
|
32
31
|
)
|
|
33
|
-
from .extraction import ExtractionSchemaCreateDataSchemaValue, ExtractionSchemaUpdateDataSchemaValue
|
|
34
32
|
from .files import FileCreateFromUrlResourceInfoValue, FileCreatePermissionInfoValue, FileCreateResourceInfoValue
|
|
35
33
|
from .llama_extract import ExtractAgentCreateDataSchemaValue, ExtractAgentUpdateDataSchemaValue
|
|
36
34
|
from .pipelines import (
|
|
@@ -61,8 +59,6 @@ __all__ = [
|
|
|
61
59
|
"EmbeddingModelConfigCreateEmbeddingConfig_VertexaiEmbedding",
|
|
62
60
|
"ExtractAgentCreateDataSchemaValue",
|
|
63
61
|
"ExtractAgentUpdateDataSchemaValue",
|
|
64
|
-
"ExtractionSchemaCreateDataSchemaValue",
|
|
65
|
-
"ExtractionSchemaUpdateDataSchemaValue",
|
|
66
62
|
"FileCreateFromUrlResourceInfoValue",
|
|
67
63
|
"FileCreatePermissionInfoValue",
|
|
68
64
|
"FileCreateResourceInfoValue",
|
|
@@ -83,7 +79,6 @@ __all__ = [
|
|
|
83
79
|
"data_sources",
|
|
84
80
|
"embedding_model_configs",
|
|
85
81
|
"evals",
|
|
86
|
-
"extraction",
|
|
87
82
|
"files",
|
|
88
83
|
"jobs",
|
|
89
84
|
"llama_extract",
|
|
@@ -187,6 +187,7 @@ class FilesClient:
|
|
|
187
187
|
def generate_presigned_url(
|
|
188
188
|
self,
|
|
189
189
|
*,
|
|
190
|
+
expires_at_seconds: typing.Optional[int] = None,
|
|
190
191
|
project_id: typing.Optional[str] = None,
|
|
191
192
|
organization_id: typing.Optional[str] = None,
|
|
192
193
|
name: str,
|
|
@@ -201,6 +202,8 @@ class FilesClient:
|
|
|
201
202
|
Create a presigned url for uploading a file.
|
|
202
203
|
|
|
203
204
|
Parameters:
|
|
205
|
+
- expires_at_seconds: typing.Optional[int].
|
|
206
|
+
|
|
204
207
|
- project_id: typing.Optional[str].
|
|
205
208
|
|
|
206
209
|
- organization_id: typing.Optional[str].
|
|
@@ -244,7 +247,9 @@ class FilesClient:
|
|
|
244
247
|
_response = self._client_wrapper.httpx_client.request(
|
|
245
248
|
"PUT",
|
|
246
249
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/files"),
|
|
247
|
-
params=remove_none_from_dict(
|
|
250
|
+
params=remove_none_from_dict(
|
|
251
|
+
{"expires_at_seconds": expires_at_seconds, "project_id": project_id, "organization_id": organization_id}
|
|
252
|
+
),
|
|
248
253
|
json=jsonable_encoder(_request),
|
|
249
254
|
headers=self._client_wrapper.get_headers(),
|
|
250
255
|
timeout=60,
|
|
@@ -370,7 +375,12 @@ class FilesClient:
|
|
|
370
375
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
371
376
|
|
|
372
377
|
def read_file_content(
|
|
373
|
-
self,
|
|
378
|
+
self,
|
|
379
|
+
id: str,
|
|
380
|
+
*,
|
|
381
|
+
expires_at_seconds: typing.Optional[int] = None,
|
|
382
|
+
project_id: typing.Optional[str] = None,
|
|
383
|
+
organization_id: typing.Optional[str] = None,
|
|
374
384
|
) -> PresignedUrl:
|
|
375
385
|
"""
|
|
376
386
|
Returns a presigned url to read the file content.
|
|
@@ -378,6 +388,8 @@ class FilesClient:
|
|
|
378
388
|
Parameters:
|
|
379
389
|
- id: str.
|
|
380
390
|
|
|
391
|
+
- expires_at_seconds: typing.Optional[int].
|
|
392
|
+
|
|
381
393
|
- project_id: typing.Optional[str].
|
|
382
394
|
|
|
383
395
|
- organization_id: typing.Optional[str].
|
|
@@ -394,7 +406,9 @@ class FilesClient:
|
|
|
394
406
|
_response = self._client_wrapper.httpx_client.request(
|
|
395
407
|
"GET",
|
|
396
408
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/files/{id}/content"),
|
|
397
|
-
params=remove_none_from_dict(
|
|
409
|
+
params=remove_none_from_dict(
|
|
410
|
+
{"expires_at_seconds": expires_at_seconds, "project_id": project_id, "organization_id": organization_id}
|
|
411
|
+
),
|
|
398
412
|
headers=self._client_wrapper.get_headers(),
|
|
399
413
|
timeout=60,
|
|
400
414
|
)
|
|
@@ -788,6 +802,7 @@ class AsyncFilesClient:
|
|
|
788
802
|
async def generate_presigned_url(
|
|
789
803
|
self,
|
|
790
804
|
*,
|
|
805
|
+
expires_at_seconds: typing.Optional[int] = None,
|
|
791
806
|
project_id: typing.Optional[str] = None,
|
|
792
807
|
organization_id: typing.Optional[str] = None,
|
|
793
808
|
name: str,
|
|
@@ -802,6 +817,8 @@ class AsyncFilesClient:
|
|
|
802
817
|
Create a presigned url for uploading a file.
|
|
803
818
|
|
|
804
819
|
Parameters:
|
|
820
|
+
- expires_at_seconds: typing.Optional[int].
|
|
821
|
+
|
|
805
822
|
- project_id: typing.Optional[str].
|
|
806
823
|
|
|
807
824
|
- organization_id: typing.Optional[str].
|
|
@@ -845,7 +862,9 @@ class AsyncFilesClient:
|
|
|
845
862
|
_response = await self._client_wrapper.httpx_client.request(
|
|
846
863
|
"PUT",
|
|
847
864
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/files"),
|
|
848
|
-
params=remove_none_from_dict(
|
|
865
|
+
params=remove_none_from_dict(
|
|
866
|
+
{"expires_at_seconds": expires_at_seconds, "project_id": project_id, "organization_id": organization_id}
|
|
867
|
+
),
|
|
849
868
|
json=jsonable_encoder(_request),
|
|
850
869
|
headers=self._client_wrapper.get_headers(),
|
|
851
870
|
timeout=60,
|
|
@@ -971,7 +990,12 @@ class AsyncFilesClient:
|
|
|
971
990
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
972
991
|
|
|
973
992
|
async def read_file_content(
|
|
974
|
-
self,
|
|
993
|
+
self,
|
|
994
|
+
id: str,
|
|
995
|
+
*,
|
|
996
|
+
expires_at_seconds: typing.Optional[int] = None,
|
|
997
|
+
project_id: typing.Optional[str] = None,
|
|
998
|
+
organization_id: typing.Optional[str] = None,
|
|
975
999
|
) -> PresignedUrl:
|
|
976
1000
|
"""
|
|
977
1001
|
Returns a presigned url to read the file content.
|
|
@@ -979,6 +1003,8 @@ class AsyncFilesClient:
|
|
|
979
1003
|
Parameters:
|
|
980
1004
|
- id: str.
|
|
981
1005
|
|
|
1006
|
+
- expires_at_seconds: typing.Optional[int].
|
|
1007
|
+
|
|
982
1008
|
- project_id: typing.Optional[str].
|
|
983
1009
|
|
|
984
1010
|
- organization_id: typing.Optional[str].
|
|
@@ -995,7 +1021,9 @@ class AsyncFilesClient:
|
|
|
995
1021
|
_response = await self._client_wrapper.httpx_client.request(
|
|
996
1022
|
"GET",
|
|
997
1023
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/files/{id}/content"),
|
|
998
|
-
params=remove_none_from_dict(
|
|
1024
|
+
params=remove_none_from_dict(
|
|
1025
|
+
{"expires_at_seconds": expires_at_seconds, "project_id": project_id, "organization_id": organization_id}
|
|
1026
|
+
),
|
|
999
1027
|
headers=self._client_wrapper.get_headers(),
|
|
1000
1028
|
timeout=60,
|
|
1001
1029
|
)
|