llama-cloud 0.0.6__py3-none-any.whl → 0.0.8__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 (42) hide show
  1. llama_cloud/__init__.py +18 -4
  2. llama_cloud/client.py +3 -0
  3. llama_cloud/resources/__init__.py +4 -1
  4. llama_cloud/resources/component_definitions/client.py +18 -18
  5. llama_cloud/resources/data_sinks/client.py +2 -2
  6. llama_cloud/resources/data_sinks/types/data_sink_update_component_one.py +2 -0
  7. llama_cloud/resources/data_sources/client.py +2 -2
  8. llama_cloud/resources/data_sources/types/data_source_update_component_one.py +4 -4
  9. llama_cloud/resources/evals/client.py +12 -12
  10. llama_cloud/resources/extraction/__init__.py +5 -0
  11. llama_cloud/resources/extraction/client.py +648 -0
  12. llama_cloud/resources/extraction/types/__init__.py +5 -0
  13. llama_cloud/resources/extraction/types/extraction_schema_update_data_schema_value.py +7 -0
  14. llama_cloud/resources/files/client.py +8 -8
  15. llama_cloud/resources/parsing/client.py +16 -0
  16. llama_cloud/resources/pipelines/client.py +156 -12
  17. llama_cloud/resources/projects/client.py +24 -24
  18. llama_cloud/types/__init__.py +14 -4
  19. llama_cloud/types/azure_open_ai_embedding.py +3 -0
  20. llama_cloud/types/{cloud_gcs_data_source.py → cloud_azure_ai_search_vector_store.py} +9 -7
  21. llama_cloud/types/{cloud_google_drive_data_source.py → cloud_notion_page_data_source.py} +4 -5
  22. llama_cloud/types/cloud_slack_data_source.py +42 -0
  23. llama_cloud/types/configurable_data_sink_names.py +4 -0
  24. llama_cloud/types/configurable_data_source_names.py +8 -8
  25. llama_cloud/types/data_sink_component_one.py +2 -0
  26. llama_cloud/types/data_sink_create_component_one.py +2 -0
  27. llama_cloud/types/data_source_component_one.py +4 -4
  28. llama_cloud/types/data_source_create_component_one.py +4 -4
  29. llama_cloud/types/eval_dataset_job_record.py +1 -1
  30. llama_cloud/types/extraction_result.py +42 -0
  31. llama_cloud/types/extraction_result_data_value.py +5 -0
  32. llama_cloud/types/extraction_schema.py +44 -0
  33. llama_cloud/types/extraction_schema_data_schema_value.py +7 -0
  34. llama_cloud/types/llama_parse_parameters.py +2 -0
  35. llama_cloud/types/llama_parse_supported_file_extensions.py +124 -0
  36. llama_cloud/types/pipeline.py +0 -4
  37. llama_cloud/types/pipeline_data_source_component_one.py +4 -4
  38. llama_cloud/types/text_node.py +1 -0
  39. {llama_cloud-0.0.6.dist-info → llama_cloud-0.0.8.dist-info}/METADATA +1 -2
  40. {llama_cloud-0.0.6.dist-info → llama_cloud-0.0.8.dist-info}/RECORD +42 -33
  41. {llama_cloud-0.0.6.dist-info → llama_cloud-0.0.8.dist-info}/WHEEL +1 -1
  42. {llama_cloud-0.0.6.dist-info → llama_cloud-0.0.8.dist-info}/LICENSE +0 -0
llama_cloud/__init__.py CHANGED
@@ -7,17 +7,18 @@ from .types import (
7
7
  BedrockEmbedding,
8
8
  ChatMessage,
9
9
  CloudAzStorageBlobDataSource,
10
+ CloudAzureAiSearchVectorStore,
10
11
  CloudChromaVectorStore,
11
12
  CloudDocument,
12
13
  CloudDocumentCreate,
13
- CloudGcsDataSource,
14
- CloudGoogleDriveDataSource,
14
+ CloudNotionPageDataSource,
15
15
  CloudOneDriveDataSource,
16
16
  CloudPineconeVectorStore,
17
17
  CloudPostgresVectorStore,
18
18
  CloudQdrantVectorStore,
19
19
  CloudS3DataSource,
20
20
  CloudSharepointDataSource,
21
+ CloudSlackDataSource,
21
22
  CloudWeaviateVectorStore,
22
23
  CodeSplitter,
23
24
  CohereEmbedding,
@@ -53,6 +54,10 @@ from .types import (
53
54
  EvalQuestion,
54
55
  EvalQuestionCreate,
55
56
  EvalQuestionResult,
57
+ ExtractionResult,
58
+ ExtractionResultDataValue,
59
+ ExtractionSchema,
60
+ ExtractionSchemaDataSchemaValue,
56
61
  File,
57
62
  FileResourceInfoValue,
58
63
  FilterCondition,
@@ -133,12 +138,14 @@ from .resources import (
133
138
  DataSourceUpdateComponent,
134
139
  DataSourceUpdateComponentOne,
135
140
  DataSourceUpdateCustomMetadataValue,
141
+ ExtractionSchemaUpdateDataSchemaValue,
136
142
  FileCreateResourceInfoValue,
137
143
  PipelineFileUpdateCustomMetadataValue,
138
144
  component_definitions,
139
145
  data_sinks,
140
146
  data_sources,
141
147
  evals,
148
+ extraction,
142
149
  files,
143
150
  parsing,
144
151
  pipelines,
@@ -153,17 +160,18 @@ __all__ = [
153
160
  "BedrockEmbedding",
154
161
  "ChatMessage",
155
162
  "CloudAzStorageBlobDataSource",
163
+ "CloudAzureAiSearchVectorStore",
156
164
  "CloudChromaVectorStore",
157
165
  "CloudDocument",
158
166
  "CloudDocumentCreate",
159
- "CloudGcsDataSource",
160
- "CloudGoogleDriveDataSource",
167
+ "CloudNotionPageDataSource",
161
168
  "CloudOneDriveDataSource",
162
169
  "CloudPineconeVectorStore",
163
170
  "CloudPostgresVectorStore",
164
171
  "CloudQdrantVectorStore",
165
172
  "CloudS3DataSource",
166
173
  "CloudSharepointDataSource",
174
+ "CloudSlackDataSource",
167
175
  "CloudWeaviateVectorStore",
168
176
  "CodeSplitter",
169
177
  "CohereEmbedding",
@@ -204,6 +212,11 @@ __all__ = [
204
212
  "EvalQuestion",
205
213
  "EvalQuestionCreate",
206
214
  "EvalQuestionResult",
215
+ "ExtractionResult",
216
+ "ExtractionResultDataValue",
217
+ "ExtractionSchema",
218
+ "ExtractionSchemaDataSchemaValue",
219
+ "ExtractionSchemaUpdateDataSchemaValue",
207
220
  "File",
208
221
  "FileCreateResourceInfoValue",
209
222
  "FileResourceInfoValue",
@@ -284,6 +297,7 @@ __all__ = [
284
297
  "data_sinks",
285
298
  "data_sources",
286
299
  "evals",
300
+ "extraction",
287
301
  "files",
288
302
  "parsing",
289
303
  "pipelines",
llama_cloud/client.py CHANGED
@@ -10,6 +10,7 @@ from .resources.component_definitions.client import AsyncComponentDefinitionsCli
10
10
  from .resources.data_sinks.client import AsyncDataSinksClient, DataSinksClient
11
11
  from .resources.data_sources.client import AsyncDataSourcesClient, DataSourcesClient
12
12
  from .resources.evals.client import AsyncEvalsClient, EvalsClient
13
+ from .resources.extraction.client import AsyncExtractionClient, ExtractionClient
13
14
  from .resources.files.client import AsyncFilesClient, FilesClient
14
15
  from .resources.parsing.client import AsyncParsingClient, ParsingClient
15
16
  from .resources.pipelines.client import AsyncPipelinesClient, PipelinesClient
@@ -39,6 +40,7 @@ class LlamaCloud:
39
40
  self.evals = EvalsClient(client_wrapper=self._client_wrapper)
40
41
  self.parsing = ParsingClient(client_wrapper=self._client_wrapper)
41
42
  self.component_definitions = ComponentDefinitionsClient(client_wrapper=self._client_wrapper)
43
+ self.extraction = ExtractionClient(client_wrapper=self._client_wrapper)
42
44
 
43
45
 
44
46
  class AsyncLlamaCloud:
@@ -64,6 +66,7 @@ class AsyncLlamaCloud:
64
66
  self.evals = AsyncEvalsClient(client_wrapper=self._client_wrapper)
65
67
  self.parsing = AsyncParsingClient(client_wrapper=self._client_wrapper)
66
68
  self.component_definitions = AsyncComponentDefinitionsClient(client_wrapper=self._client_wrapper)
69
+ self.extraction = AsyncExtractionClient(client_wrapper=self._client_wrapper)
67
70
 
68
71
 
69
72
  def _get_base_url(*, base_url: typing.Optional[str] = None, environment: LlamaCloudEnvironment) -> str:
@@ -1,8 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from . import component_definitions, data_sinks, data_sources, evals, files, parsing, pipelines, projects
3
+ from . import component_definitions, data_sinks, data_sources, evals, extraction, files, parsing, pipelines, projects
4
4
  from .data_sinks import DataSinkUpdateComponent, DataSinkUpdateComponentOne
5
5
  from .data_sources import DataSourceUpdateComponent, DataSourceUpdateComponentOne, DataSourceUpdateCustomMetadataValue
6
+ from .extraction import ExtractionSchemaUpdateDataSchemaValue
6
7
  from .files import FileCreateResourceInfoValue
7
8
  from .pipelines import PipelineFileUpdateCustomMetadataValue
8
9
 
@@ -12,12 +13,14 @@ __all__ = [
12
13
  "DataSourceUpdateComponent",
13
14
  "DataSourceUpdateComponentOne",
14
15
  "DataSourceUpdateCustomMetadataValue",
16
+ "ExtractionSchemaUpdateDataSchemaValue",
15
17
  "FileCreateResourceInfoValue",
16
18
  "PipelineFileUpdateCustomMetadataValue",
17
19
  "component_definitions",
18
20
  "data_sinks",
19
21
  "data_sources",
20
22
  "evals",
23
+ "extraction",
21
24
  "files",
22
25
  "parsing",
23
26
  "pipelines",
@@ -23,9 +23,9 @@ class ComponentDefinitionsClient:
23
23
  def __init__(self, *, client_wrapper: SyncClientWrapper):
24
24
  self._client_wrapper = client_wrapper
25
25
 
26
- def get_all_transformation_definitions(self) -> typing.List[ConfigurableTransformationDefinition]:
26
+ def list_transformation_definitions(self) -> typing.List[ConfigurableTransformationDefinition]:
27
27
  """
28
- Get all configurable transformation component definitions.
28
+ List transformation component definitions.
29
29
 
30
30
  ---
31
31
  from llama_cloud.client import LlamaCloud
@@ -33,7 +33,7 @@ class ComponentDefinitionsClient:
33
33
  client = LlamaCloud(
34
34
  token="YOUR_TOKEN",
35
35
  )
36
- client.component_definitions.get_all_transformation_definitions()
36
+ client.component_definitions.list_transformation_definitions()
37
37
  """
38
38
  _response = self._client_wrapper.httpx_client.request(
39
39
  "GET",
@@ -51,9 +51,9 @@ class ComponentDefinitionsClient:
51
51
  raise ApiError(status_code=_response.status_code, body=_response.text)
52
52
  raise ApiError(status_code=_response.status_code, body=_response_json)
53
53
 
54
- def get_all_data_source_definitions(self) -> typing.List[DataSourceDefinition]:
54
+ def list_data_source_definitions(self) -> typing.List[DataSourceDefinition]:
55
55
  """
56
- Get all data source component definitions.
56
+ List data source component definitions.
57
57
 
58
58
  ---
59
59
  from llama_cloud.client import LlamaCloud
@@ -61,7 +61,7 @@ class ComponentDefinitionsClient:
61
61
  client = LlamaCloud(
62
62
  token="YOUR_TOKEN",
63
63
  )
64
- client.component_definitions.get_all_data_source_definitions()
64
+ client.component_definitions.list_data_source_definitions()
65
65
  """
66
66
  _response = self._client_wrapper.httpx_client.request(
67
67
  "GET",
@@ -77,9 +77,9 @@ class ComponentDefinitionsClient:
77
77
  raise ApiError(status_code=_response.status_code, body=_response.text)
78
78
  raise ApiError(status_code=_response.status_code, body=_response_json)
79
79
 
80
- def get_all_data_sink_definitions(self) -> typing.List[DataSinkDefinition]:
80
+ def list_data_sink_definitions(self) -> typing.List[DataSinkDefinition]:
81
81
  """
82
- Get all data sink component definitions.
82
+ List data sink component definitions.
83
83
 
84
84
  ---
85
85
  from llama_cloud.client import LlamaCloud
@@ -87,7 +87,7 @@ class ComponentDefinitionsClient:
87
87
  client = LlamaCloud(
88
88
  token="YOUR_TOKEN",
89
89
  )
90
- client.component_definitions.get_all_data_sink_definitions()
90
+ client.component_definitions.list_data_sink_definitions()
91
91
  """
92
92
  _response = self._client_wrapper.httpx_client.request(
93
93
  "GET",
@@ -108,9 +108,9 @@ class AsyncComponentDefinitionsClient:
108
108
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
109
109
  self._client_wrapper = client_wrapper
110
110
 
111
- async def get_all_transformation_definitions(self) -> typing.List[ConfigurableTransformationDefinition]:
111
+ async def list_transformation_definitions(self) -> typing.List[ConfigurableTransformationDefinition]:
112
112
  """
113
- Get all configurable transformation component definitions.
113
+ List transformation component definitions.
114
114
 
115
115
  ---
116
116
  from llama_cloud.client import AsyncLlamaCloud
@@ -118,7 +118,7 @@ class AsyncComponentDefinitionsClient:
118
118
  client = AsyncLlamaCloud(
119
119
  token="YOUR_TOKEN",
120
120
  )
121
- await client.component_definitions.get_all_transformation_definitions()
121
+ await client.component_definitions.list_transformation_definitions()
122
122
  """
123
123
  _response = await self._client_wrapper.httpx_client.request(
124
124
  "GET",
@@ -136,9 +136,9 @@ class AsyncComponentDefinitionsClient:
136
136
  raise ApiError(status_code=_response.status_code, body=_response.text)
137
137
  raise ApiError(status_code=_response.status_code, body=_response_json)
138
138
 
139
- async def get_all_data_source_definitions(self) -> typing.List[DataSourceDefinition]:
139
+ async def list_data_source_definitions(self) -> typing.List[DataSourceDefinition]:
140
140
  """
141
- Get all data source component definitions.
141
+ List data source component definitions.
142
142
 
143
143
  ---
144
144
  from llama_cloud.client import AsyncLlamaCloud
@@ -146,7 +146,7 @@ class AsyncComponentDefinitionsClient:
146
146
  client = AsyncLlamaCloud(
147
147
  token="YOUR_TOKEN",
148
148
  )
149
- await client.component_definitions.get_all_data_source_definitions()
149
+ await client.component_definitions.list_data_source_definitions()
150
150
  """
151
151
  _response = await self._client_wrapper.httpx_client.request(
152
152
  "GET",
@@ -162,9 +162,9 @@ class AsyncComponentDefinitionsClient:
162
162
  raise ApiError(status_code=_response.status_code, body=_response.text)
163
163
  raise ApiError(status_code=_response.status_code, body=_response_json)
164
164
 
165
- async def get_all_data_sink_definitions(self) -> typing.List[DataSinkDefinition]:
165
+ async def list_data_sink_definitions(self) -> typing.List[DataSinkDefinition]:
166
166
  """
167
- Get all data sink component definitions.
167
+ List data sink component definitions.
168
168
 
169
169
  ---
170
170
  from llama_cloud.client import AsyncLlamaCloud
@@ -172,7 +172,7 @@ class AsyncComponentDefinitionsClient:
172
172
  client = AsyncLlamaCloud(
173
173
  token="YOUR_TOKEN",
174
174
  )
175
- await client.component_definitions.get_all_data_sink_definitions()
175
+ await client.component_definitions.list_data_sink_definitions()
176
176
  """
177
177
  _response = await self._client_wrapper.httpx_client.request(
178
178
  "GET",
@@ -33,7 +33,7 @@ class DataSinksClient:
33
33
 
34
34
  def list_data_sinks(self, *, project_id: typing.Optional[str] = None) -> typing.List[DataSink]:
35
35
  """
36
- Get all data sinks for a given project.
36
+ List data sinks for a given project.
37
37
  If project_id is not provided, uses the default project.
38
38
 
39
39
  Parameters:
@@ -268,7 +268,7 @@ class AsyncDataSinksClient:
268
268
 
269
269
  async def list_data_sinks(self, *, project_id: typing.Optional[str] = None) -> typing.List[DataSink]:
270
270
  """
271
- Get all data sinks for a given project.
271
+ List data sinks for a given project.
272
272
  If project_id is not provided, uses the default project.
273
273
 
274
274
  Parameters:
@@ -2,6 +2,7 @@
2
2
 
3
3
  import typing
4
4
 
5
+ from ....types.cloud_azure_ai_search_vector_store import CloudAzureAiSearchVectorStore
5
6
  from ....types.cloud_chroma_vector_store import CloudChromaVectorStore
6
7
  from ....types.cloud_pinecone_vector_store import CloudPineconeVectorStore
7
8
  from ....types.cloud_postgres_vector_store import CloudPostgresVectorStore
@@ -14,4 +15,5 @@ DataSinkUpdateComponentOne = typing.Union[
14
15
  CloudPostgresVectorStore,
15
16
  CloudQdrantVectorStore,
16
17
  CloudWeaviateVectorStore,
18
+ CloudAzureAiSearchVectorStore,
17
19
  ]
@@ -34,7 +34,7 @@ class DataSourcesClient:
34
34
 
35
35
  def list_data_sources(self, *, project_id: typing.Optional[str] = None) -> typing.List[DataSource]:
36
36
  """
37
- Get all data sources for a given project.
37
+ List data sources for a given project.
38
38
  If project_id is not provided, uses the default project.
39
39
 
40
40
  Parameters:
@@ -274,7 +274,7 @@ class AsyncDataSourcesClient:
274
274
 
275
275
  async def list_data_sources(self, *, project_id: typing.Optional[str] = None) -> typing.List[DataSource]:
276
276
  """
277
- Get all data sources for a given project.
277
+ List data sources for a given project.
278
278
  If project_id is not provided, uses the default project.
279
279
 
280
280
  Parameters:
@@ -3,17 +3,17 @@
3
3
  import typing
4
4
 
5
5
  from ....types.cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
6
- from ....types.cloud_gcs_data_source import CloudGcsDataSource
7
- from ....types.cloud_google_drive_data_source import CloudGoogleDriveDataSource
6
+ from ....types.cloud_notion_page_data_source import CloudNotionPageDataSource
8
7
  from ....types.cloud_one_drive_data_source import CloudOneDriveDataSource
9
8
  from ....types.cloud_s_3_data_source import CloudS3DataSource
10
9
  from ....types.cloud_sharepoint_data_source import CloudSharepointDataSource
10
+ from ....types.cloud_slack_data_source import CloudSlackDataSource
11
11
 
12
12
  DataSourceUpdateComponentOne = typing.Union[
13
13
  CloudS3DataSource,
14
14
  CloudAzStorageBlobDataSource,
15
- CloudGcsDataSource,
16
- CloudGoogleDriveDataSource,
17
15
  CloudOneDriveDataSource,
18
16
  CloudSharepointDataSource,
17
+ CloudSlackDataSource,
18
+ CloudNotionPageDataSource,
19
19
  ]
@@ -130,9 +130,9 @@ class EvalsClient:
130
130
  raise ApiError(status_code=_response.status_code, body=_response.text)
131
131
  raise ApiError(status_code=_response.status_code, body=_response_json)
132
132
 
133
- def get_questions(self, dataset_id: str) -> typing.List[EvalQuestion]:
133
+ def list_questions(self, dataset_id: str) -> typing.List[EvalQuestion]:
134
134
  """
135
- Get all questions for a dataset.
135
+ List questions for a dataset.
136
136
 
137
137
  Parameters:
138
138
  - dataset_id: str.
@@ -142,7 +142,7 @@ class EvalsClient:
142
142
  client = LlamaCloud(
143
143
  token="YOUR_TOKEN",
144
144
  )
145
- client.evals.get_questions(
145
+ client.evals.list_questions(
146
146
  dataset_id="string",
147
147
  )
148
148
  """
@@ -348,9 +348,9 @@ class EvalsClient:
348
348
  raise ApiError(status_code=_response.status_code, body=_response.text)
349
349
  raise ApiError(status_code=_response.status_code, body=_response_json)
350
350
 
351
- def get_supported_models(self) -> typing.List[SupportedEvalLlmModel]:
351
+ def list_supported_models(self) -> typing.List[SupportedEvalLlmModel]:
352
352
  """
353
- Get all supported models.
353
+ List supported models.
354
354
 
355
355
  ---
356
356
  from llama_cloud.client import LlamaCloud
@@ -358,7 +358,7 @@ class EvalsClient:
358
358
  client = LlamaCloud(
359
359
  token="YOUR_TOKEN",
360
360
  )
361
- client.evals.get_supported_models()
361
+ client.evals.list_supported_models()
362
362
  """
363
363
  _response = self._client_wrapper.httpx_client.request(
364
364
  "GET",
@@ -481,9 +481,9 @@ class AsyncEvalsClient:
481
481
  raise ApiError(status_code=_response.status_code, body=_response.text)
482
482
  raise ApiError(status_code=_response.status_code, body=_response_json)
483
483
 
484
- async def get_questions(self, dataset_id: str) -> typing.List[EvalQuestion]:
484
+ async def list_questions(self, dataset_id: str) -> typing.List[EvalQuestion]:
485
485
  """
486
- Get all questions for a dataset.
486
+ List questions for a dataset.
487
487
 
488
488
  Parameters:
489
489
  - dataset_id: str.
@@ -493,7 +493,7 @@ class AsyncEvalsClient:
493
493
  client = AsyncLlamaCloud(
494
494
  token="YOUR_TOKEN",
495
495
  )
496
- await client.evals.get_questions(
496
+ await client.evals.list_questions(
497
497
  dataset_id="string",
498
498
  )
499
499
  """
@@ -699,9 +699,9 @@ class AsyncEvalsClient:
699
699
  raise ApiError(status_code=_response.status_code, body=_response.text)
700
700
  raise ApiError(status_code=_response.status_code, body=_response_json)
701
701
 
702
- async def get_supported_models(self) -> typing.List[SupportedEvalLlmModel]:
702
+ async def list_supported_models(self) -> typing.List[SupportedEvalLlmModel]:
703
703
  """
704
- Get all supported models.
704
+ List supported models.
705
705
 
706
706
  ---
707
707
  from llama_cloud.client import AsyncLlamaCloud
@@ -709,7 +709,7 @@ class AsyncEvalsClient:
709
709
  client = AsyncLlamaCloud(
710
710
  token="YOUR_TOKEN",
711
711
  )
712
- await client.evals.get_supported_models()
712
+ await client.evals.list_supported_models()
713
713
  """
714
714
  _response = await self._client_wrapper.httpx_client.request(
715
715
  "GET",
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import ExtractionSchemaUpdateDataSchemaValue
4
+
5
+ __all__ = ["ExtractionSchemaUpdateDataSchemaValue"]