llama-cloud 0.0.10__py3-none-any.whl → 0.0.12__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 +82 -6
- llama_cloud/client.py +3 -0
- llama_cloud/resources/__init__.py +13 -2
- llama_cloud/resources/auth/__init__.py +2 -0
- llama_cloud/resources/auth/client.py +124 -0
- llama_cloud/resources/data_sinks/types/data_sink_update_component_one.py +4 -0
- llama_cloud/resources/extraction/__init__.py +2 -2
- llama_cloud/resources/extraction/client.py +139 -48
- llama_cloud/resources/extraction/types/__init__.py +2 -1
- llama_cloud/resources/extraction/types/extraction_schema_create_data_schema_value.py +7 -0
- llama_cloud/resources/pipelines/__init__.py +12 -2
- llama_cloud/resources/pipelines/client.py +58 -2
- llama_cloud/resources/pipelines/types/__init__.py +11 -1
- llama_cloud/resources/pipelines/types/pipeline_update_transform_config.py +31 -0
- llama_cloud/types/__init__.py +78 -6
- llama_cloud/types/advanced_mode_transform_config.py +38 -0
- llama_cloud/types/advanced_mode_transform_config_chunking_config.py +67 -0
- llama_cloud/types/advanced_mode_transform_config_segmentation_config.py +45 -0
- llama_cloud/types/auto_transform_config.py +32 -0
- llama_cloud/types/character_chunking_config.py +32 -0
- llama_cloud/types/{html_node_parser.py → character_splitter.py} +9 -9
- llama_cloud/types/chat_data.py +2 -0
- llama_cloud/types/cloud_az_storage_blob_data_source.py +11 -2
- llama_cloud/types/{simple_file_node_parser.py → cloud_milvus_vector_store.py} +7 -14
- llama_cloud/types/cloud_mongo_db_atlas_vector_search.py +51 -0
- llama_cloud/types/configurable_data_sink_names.py +8 -0
- llama_cloud/types/configurable_transformation_names.py +8 -12
- llama_cloud/types/configured_transformation_item_component_one.py +4 -6
- llama_cloud/types/custom_claims.py +61 -0
- llama_cloud/types/data_sink_component_one.py +4 -0
- llama_cloud/types/data_sink_create_component_one.py +4 -0
- llama_cloud/types/element_segmentation_config.py +29 -0
- llama_cloud/types/embedding_config.py +36 -0
- llama_cloud/types/embedding_config_component.py +7 -0
- llama_cloud/types/embedding_config_component_one.py +19 -0
- llama_cloud/types/embedding_config_type.py +41 -0
- llama_cloud/types/eval_dataset_job_record.py +1 -0
- llama_cloud/types/ingestion_error_response.py +34 -0
- llama_cloud/types/job_name_mapping.py +45 -0
- llama_cloud/types/llama_parse_supported_file_extensions.py +32 -0
- llama_cloud/types/llm_parameters.py +39 -0
- llama_cloud/types/managed_ingestion_status_response.py +6 -0
- llama_cloud/types/none_chunking_config.py +29 -0
- llama_cloud/types/none_segmentation_config.py +29 -0
- llama_cloud/types/page_segmentation_config.py +29 -0
- llama_cloud/types/{json_node_parser.py → page_splitter_node_parser.py} +3 -8
- llama_cloud/types/parsing_job.py +2 -0
- llama_cloud/types/pipeline_create.py +8 -0
- llama_cloud/types/pipeline_create_transform_config.py +31 -0
- llama_cloud/types/semantic_chunking_config.py +32 -0
- llama_cloud/types/sentence_chunking_config.py +34 -0
- llama_cloud/types/token_chunking_config.py +33 -0
- llama_cloud/types/user.py +35 -0
- {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/METADATA +1 -1
- {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/RECORD +57 -30
- {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/LICENSE +0 -0
- {llama_cloud-0.0.10.dist-info → llama_cloud-0.0.12.dist-info}/WHEEL +0 -0
llama_cloud/__init__.py
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from .types import (
|
|
4
|
+
AdvancedModeTransformConfig,
|
|
5
|
+
AdvancedModeTransformConfigChunkingConfig,
|
|
6
|
+
AdvancedModeTransformConfigChunkingConfig_Character,
|
|
7
|
+
AdvancedModeTransformConfigChunkingConfig_None,
|
|
8
|
+
AdvancedModeTransformConfigChunkingConfig_Semantic,
|
|
9
|
+
AdvancedModeTransformConfigChunkingConfig_Sentence,
|
|
10
|
+
AdvancedModeTransformConfigChunkingConfig_Token,
|
|
11
|
+
AdvancedModeTransformConfigSegmentationConfig,
|
|
12
|
+
AdvancedModeTransformConfigSegmentationConfig_Element,
|
|
13
|
+
AdvancedModeTransformConfigSegmentationConfig_None,
|
|
14
|
+
AdvancedModeTransformConfigSegmentationConfig_Page,
|
|
15
|
+
AutoTransformConfig,
|
|
4
16
|
AzureOpenAiEmbedding,
|
|
5
17
|
Base,
|
|
6
18
|
BasePromptTemplate,
|
|
7
19
|
BedrockEmbedding,
|
|
20
|
+
CharacterChunkingConfig,
|
|
21
|
+
CharacterSplitter,
|
|
8
22
|
ChatData,
|
|
9
23
|
ChatMessage,
|
|
10
24
|
CloudAzStorageBlobDataSource,
|
|
@@ -14,6 +28,8 @@ from .types import (
|
|
|
14
28
|
CloudDocument,
|
|
15
29
|
CloudDocumentCreate,
|
|
16
30
|
CloudJiraDataSource,
|
|
31
|
+
CloudMilvusVectorStore,
|
|
32
|
+
CloudMongoDbAtlasVectorSearch,
|
|
17
33
|
CloudNotionPageDataSource,
|
|
18
34
|
CloudOneDriveDataSource,
|
|
19
35
|
CloudPineconeVectorStore,
|
|
@@ -32,6 +48,7 @@ from .types import (
|
|
|
32
48
|
ConfiguredTransformationItem,
|
|
33
49
|
ConfiguredTransformationItemComponent,
|
|
34
50
|
ConfiguredTransformationItemComponentOne,
|
|
51
|
+
CustomClaims,
|
|
35
52
|
DataSink,
|
|
36
53
|
DataSinkComponent,
|
|
37
54
|
DataSinkComponentOne,
|
|
@@ -48,6 +65,11 @@ from .types import (
|
|
|
48
65
|
DataSourceCreateCustomMetadataValue,
|
|
49
66
|
DataSourceCustomMetadataValue,
|
|
50
67
|
DataSourceDefinition,
|
|
68
|
+
ElementSegmentationConfig,
|
|
69
|
+
EmbeddingConfig,
|
|
70
|
+
EmbeddingConfigComponent,
|
|
71
|
+
EmbeddingConfigComponentOne,
|
|
72
|
+
EmbeddingConfigType,
|
|
51
73
|
EvalDataset,
|
|
52
74
|
EvalDatasetJobParams,
|
|
53
75
|
EvalDatasetJobRecord,
|
|
@@ -67,14 +89,15 @@ from .types import (
|
|
|
67
89
|
FilterCondition,
|
|
68
90
|
FilterOperator,
|
|
69
91
|
GeminiEmbedding,
|
|
70
|
-
HtmlNodeParser,
|
|
71
92
|
HttpValidationError,
|
|
72
93
|
HuggingFaceInferenceApiEmbedding,
|
|
73
94
|
HuggingFaceInferenceApiEmbeddingToken,
|
|
74
|
-
|
|
95
|
+
IngestionErrorResponse,
|
|
96
|
+
JobNameMapping,
|
|
75
97
|
LlamaParseParameters,
|
|
76
98
|
LlamaParseSupportedFileExtensions,
|
|
77
99
|
Llm,
|
|
100
|
+
LlmParameters,
|
|
78
101
|
LocalEval,
|
|
79
102
|
LocalEvalResults,
|
|
80
103
|
LocalEvalSets,
|
|
@@ -89,10 +112,14 @@ from .types import (
|
|
|
89
112
|
MetadataFiltersFiltersItem,
|
|
90
113
|
MetricResult,
|
|
91
114
|
NodeParser,
|
|
115
|
+
NoneChunkingConfig,
|
|
116
|
+
NoneSegmentationConfig,
|
|
92
117
|
ObjectType,
|
|
93
118
|
OpenAiEmbedding,
|
|
94
119
|
Organization,
|
|
95
120
|
OrganizationCreate,
|
|
121
|
+
PageSegmentationConfig,
|
|
122
|
+
PageSplitterNodeParser,
|
|
96
123
|
ParserLanguages,
|
|
97
124
|
ParsingHistoryItem,
|
|
98
125
|
ParsingJob,
|
|
@@ -102,6 +129,9 @@ from .types import (
|
|
|
102
129
|
ParsingUsage,
|
|
103
130
|
Pipeline,
|
|
104
131
|
PipelineCreate,
|
|
132
|
+
PipelineCreateTransformConfig,
|
|
133
|
+
PipelineCreateTransformConfig_Advanced,
|
|
134
|
+
PipelineCreateTransformConfig_Auto,
|
|
105
135
|
PipelineDataSource,
|
|
106
136
|
PipelineDataSourceComponent,
|
|
107
137
|
PipelineDataSourceComponentOne,
|
|
@@ -125,16 +155,19 @@ from .types import (
|
|
|
125
155
|
RelatedNodeInfo,
|
|
126
156
|
RetrievalMode,
|
|
127
157
|
RetrieveResults,
|
|
158
|
+
SemanticChunkingConfig,
|
|
159
|
+
SentenceChunkingConfig,
|
|
128
160
|
SentenceSplitter,
|
|
129
|
-
SimpleFileNodeParser,
|
|
130
161
|
StatusEnum,
|
|
131
162
|
SupportedEvalLlmModel,
|
|
132
163
|
SupportedEvalLlmModelNames,
|
|
133
164
|
TextNode,
|
|
134
165
|
TextNodeRelationshipsValue,
|
|
135
166
|
TextNodeWithScore,
|
|
167
|
+
TokenChunkingConfig,
|
|
136
168
|
TokenTextSplitter,
|
|
137
169
|
TransformationCategoryNames,
|
|
170
|
+
User,
|
|
138
171
|
UserOrganization,
|
|
139
172
|
UserOrganizationCreate,
|
|
140
173
|
UserOrganizationDelete,
|
|
@@ -148,9 +181,14 @@ from .resources import (
|
|
|
148
181
|
DataSourceUpdateComponent,
|
|
149
182
|
DataSourceUpdateComponentOne,
|
|
150
183
|
DataSourceUpdateCustomMetadataValue,
|
|
184
|
+
ExtractionSchemaCreateDataSchemaValue,
|
|
151
185
|
ExtractionSchemaUpdateDataSchemaValue,
|
|
152
186
|
FileCreateResourceInfoValue,
|
|
153
187
|
PipelineFileUpdateCustomMetadataValue,
|
|
188
|
+
PipelineUpdateTransformConfig,
|
|
189
|
+
PipelineUpdateTransformConfig_Advanced,
|
|
190
|
+
PipelineUpdateTransformConfig_Auto,
|
|
191
|
+
auth,
|
|
154
192
|
component_definitions,
|
|
155
193
|
data_sinks,
|
|
156
194
|
data_sources,
|
|
@@ -165,10 +203,24 @@ from .resources import (
|
|
|
165
203
|
from .environment import LlamaCloudEnvironment
|
|
166
204
|
|
|
167
205
|
__all__ = [
|
|
206
|
+
"AdvancedModeTransformConfig",
|
|
207
|
+
"AdvancedModeTransformConfigChunkingConfig",
|
|
208
|
+
"AdvancedModeTransformConfigChunkingConfig_Character",
|
|
209
|
+
"AdvancedModeTransformConfigChunkingConfig_None",
|
|
210
|
+
"AdvancedModeTransformConfigChunkingConfig_Semantic",
|
|
211
|
+
"AdvancedModeTransformConfigChunkingConfig_Sentence",
|
|
212
|
+
"AdvancedModeTransformConfigChunkingConfig_Token",
|
|
213
|
+
"AdvancedModeTransformConfigSegmentationConfig",
|
|
214
|
+
"AdvancedModeTransformConfigSegmentationConfig_Element",
|
|
215
|
+
"AdvancedModeTransformConfigSegmentationConfig_None",
|
|
216
|
+
"AdvancedModeTransformConfigSegmentationConfig_Page",
|
|
217
|
+
"AutoTransformConfig",
|
|
168
218
|
"AzureOpenAiEmbedding",
|
|
169
219
|
"Base",
|
|
170
220
|
"BasePromptTemplate",
|
|
171
221
|
"BedrockEmbedding",
|
|
222
|
+
"CharacterChunkingConfig",
|
|
223
|
+
"CharacterSplitter",
|
|
172
224
|
"ChatData",
|
|
173
225
|
"ChatMessage",
|
|
174
226
|
"CloudAzStorageBlobDataSource",
|
|
@@ -178,6 +230,8 @@ __all__ = [
|
|
|
178
230
|
"CloudDocument",
|
|
179
231
|
"CloudDocumentCreate",
|
|
180
232
|
"CloudJiraDataSource",
|
|
233
|
+
"CloudMilvusVectorStore",
|
|
234
|
+
"CloudMongoDbAtlasVectorSearch",
|
|
181
235
|
"CloudNotionPageDataSource",
|
|
182
236
|
"CloudOneDriveDataSource",
|
|
183
237
|
"CloudPineconeVectorStore",
|
|
@@ -196,6 +250,7 @@ __all__ = [
|
|
|
196
250
|
"ConfiguredTransformationItem",
|
|
197
251
|
"ConfiguredTransformationItemComponent",
|
|
198
252
|
"ConfiguredTransformationItemComponentOne",
|
|
253
|
+
"CustomClaims",
|
|
199
254
|
"DataSink",
|
|
200
255
|
"DataSinkComponent",
|
|
201
256
|
"DataSinkComponentOne",
|
|
@@ -217,6 +272,11 @@ __all__ = [
|
|
|
217
272
|
"DataSourceUpdateComponent",
|
|
218
273
|
"DataSourceUpdateComponentOne",
|
|
219
274
|
"DataSourceUpdateCustomMetadataValue",
|
|
275
|
+
"ElementSegmentationConfig",
|
|
276
|
+
"EmbeddingConfig",
|
|
277
|
+
"EmbeddingConfigComponent",
|
|
278
|
+
"EmbeddingConfigComponentOne",
|
|
279
|
+
"EmbeddingConfigType",
|
|
220
280
|
"EvalDataset",
|
|
221
281
|
"EvalDatasetJobParams",
|
|
222
282
|
"EvalDatasetJobRecord",
|
|
@@ -230,6 +290,7 @@ __all__ = [
|
|
|
230
290
|
"ExtractionResult",
|
|
231
291
|
"ExtractionResultDataValue",
|
|
232
292
|
"ExtractionSchema",
|
|
293
|
+
"ExtractionSchemaCreateDataSchemaValue",
|
|
233
294
|
"ExtractionSchemaDataSchemaValue",
|
|
234
295
|
"ExtractionSchemaUpdateDataSchemaValue",
|
|
235
296
|
"File",
|
|
@@ -238,15 +299,16 @@ __all__ = [
|
|
|
238
299
|
"FilterCondition",
|
|
239
300
|
"FilterOperator",
|
|
240
301
|
"GeminiEmbedding",
|
|
241
|
-
"HtmlNodeParser",
|
|
242
302
|
"HttpValidationError",
|
|
243
303
|
"HuggingFaceInferenceApiEmbedding",
|
|
244
304
|
"HuggingFaceInferenceApiEmbeddingToken",
|
|
245
|
-
"
|
|
305
|
+
"IngestionErrorResponse",
|
|
306
|
+
"JobNameMapping",
|
|
246
307
|
"LlamaCloudEnvironment",
|
|
247
308
|
"LlamaParseParameters",
|
|
248
309
|
"LlamaParseSupportedFileExtensions",
|
|
249
310
|
"Llm",
|
|
311
|
+
"LlmParameters",
|
|
250
312
|
"LocalEval",
|
|
251
313
|
"LocalEvalResults",
|
|
252
314
|
"LocalEvalSets",
|
|
@@ -261,10 +323,14 @@ __all__ = [
|
|
|
261
323
|
"MetadataFiltersFiltersItem",
|
|
262
324
|
"MetricResult",
|
|
263
325
|
"NodeParser",
|
|
326
|
+
"NoneChunkingConfig",
|
|
327
|
+
"NoneSegmentationConfig",
|
|
264
328
|
"ObjectType",
|
|
265
329
|
"OpenAiEmbedding",
|
|
266
330
|
"Organization",
|
|
267
331
|
"OrganizationCreate",
|
|
332
|
+
"PageSegmentationConfig",
|
|
333
|
+
"PageSplitterNodeParser",
|
|
268
334
|
"ParserLanguages",
|
|
269
335
|
"ParsingHistoryItem",
|
|
270
336
|
"ParsingJob",
|
|
@@ -274,6 +340,9 @@ __all__ = [
|
|
|
274
340
|
"ParsingUsage",
|
|
275
341
|
"Pipeline",
|
|
276
342
|
"PipelineCreate",
|
|
343
|
+
"PipelineCreateTransformConfig",
|
|
344
|
+
"PipelineCreateTransformConfig_Advanced",
|
|
345
|
+
"PipelineCreateTransformConfig_Auto",
|
|
277
346
|
"PipelineDataSource",
|
|
278
347
|
"PipelineDataSourceComponent",
|
|
279
348
|
"PipelineDataSourceComponentOne",
|
|
@@ -287,6 +356,9 @@ __all__ = [
|
|
|
287
356
|
"PipelineFileResourceInfoValue",
|
|
288
357
|
"PipelineFileUpdateCustomMetadataValue",
|
|
289
358
|
"PipelineType",
|
|
359
|
+
"PipelineUpdateTransformConfig",
|
|
360
|
+
"PipelineUpdateTransformConfig_Advanced",
|
|
361
|
+
"PipelineUpdateTransformConfig_Auto",
|
|
290
362
|
"Pooling",
|
|
291
363
|
"PresetRetrievalParams",
|
|
292
364
|
"PresignedUrl",
|
|
@@ -298,22 +370,26 @@ __all__ = [
|
|
|
298
370
|
"RelatedNodeInfo",
|
|
299
371
|
"RetrievalMode",
|
|
300
372
|
"RetrieveResults",
|
|
373
|
+
"SemanticChunkingConfig",
|
|
374
|
+
"SentenceChunkingConfig",
|
|
301
375
|
"SentenceSplitter",
|
|
302
|
-
"SimpleFileNodeParser",
|
|
303
376
|
"StatusEnum",
|
|
304
377
|
"SupportedEvalLlmModel",
|
|
305
378
|
"SupportedEvalLlmModelNames",
|
|
306
379
|
"TextNode",
|
|
307
380
|
"TextNodeRelationshipsValue",
|
|
308
381
|
"TextNodeWithScore",
|
|
382
|
+
"TokenChunkingConfig",
|
|
309
383
|
"TokenTextSplitter",
|
|
310
384
|
"TransformationCategoryNames",
|
|
311
385
|
"UnprocessableEntityError",
|
|
386
|
+
"User",
|
|
312
387
|
"UserOrganization",
|
|
313
388
|
"UserOrganizationCreate",
|
|
314
389
|
"UserOrganizationDelete",
|
|
315
390
|
"ValidationError",
|
|
316
391
|
"ValidationErrorLocItem",
|
|
392
|
+
"auth",
|
|
317
393
|
"component_definitions",
|
|
318
394
|
"data_sinks",
|
|
319
395
|
"data_sources",
|
llama_cloud/client.py
CHANGED
|
@@ -6,6 +6,7 @@ import httpx
|
|
|
6
6
|
|
|
7
7
|
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
8
|
from .environment import LlamaCloudEnvironment
|
|
9
|
+
from .resources.auth.client import AsyncAuthClient, AuthClient
|
|
9
10
|
from .resources.component_definitions.client import AsyncComponentDefinitionsClient, ComponentDefinitionsClient
|
|
10
11
|
from .resources.data_sinks.client import AsyncDataSinksClient, DataSinksClient
|
|
11
12
|
from .resources.data_sources.client import AsyncDataSourcesClient, DataSourcesClient
|
|
@@ -42,6 +43,7 @@ class LlamaCloud:
|
|
|
42
43
|
self.evals = EvalsClient(client_wrapper=self._client_wrapper)
|
|
43
44
|
self.parsing = ParsingClient(client_wrapper=self._client_wrapper)
|
|
44
45
|
self.component_definitions = ComponentDefinitionsClient(client_wrapper=self._client_wrapper)
|
|
46
|
+
self.auth = AuthClient(client_wrapper=self._client_wrapper)
|
|
45
47
|
self.extraction = ExtractionClient(client_wrapper=self._client_wrapper)
|
|
46
48
|
|
|
47
49
|
|
|
@@ -69,6 +71,7 @@ class AsyncLlamaCloud:
|
|
|
69
71
|
self.evals = AsyncEvalsClient(client_wrapper=self._client_wrapper)
|
|
70
72
|
self.parsing = AsyncParsingClient(client_wrapper=self._client_wrapper)
|
|
71
73
|
self.component_definitions = AsyncComponentDefinitionsClient(client_wrapper=self._client_wrapper)
|
|
74
|
+
self.auth = AsyncAuthClient(client_wrapper=self._client_wrapper)
|
|
72
75
|
self.extraction = AsyncExtractionClient(client_wrapper=self._client_wrapper)
|
|
73
76
|
|
|
74
77
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from . import (
|
|
4
|
+
auth,
|
|
4
5
|
component_definitions,
|
|
5
6
|
data_sinks,
|
|
6
7
|
data_sources,
|
|
@@ -14,9 +15,14 @@ from . import (
|
|
|
14
15
|
)
|
|
15
16
|
from .data_sinks import DataSinkUpdateComponent, DataSinkUpdateComponentOne
|
|
16
17
|
from .data_sources import DataSourceUpdateComponent, DataSourceUpdateComponentOne, DataSourceUpdateCustomMetadataValue
|
|
17
|
-
from .extraction import ExtractionSchemaUpdateDataSchemaValue
|
|
18
|
+
from .extraction import ExtractionSchemaCreateDataSchemaValue, ExtractionSchemaUpdateDataSchemaValue
|
|
18
19
|
from .files import FileCreateResourceInfoValue
|
|
19
|
-
from .pipelines import
|
|
20
|
+
from .pipelines import (
|
|
21
|
+
PipelineFileUpdateCustomMetadataValue,
|
|
22
|
+
PipelineUpdateTransformConfig,
|
|
23
|
+
PipelineUpdateTransformConfig_Advanced,
|
|
24
|
+
PipelineUpdateTransformConfig_Auto,
|
|
25
|
+
)
|
|
20
26
|
|
|
21
27
|
__all__ = [
|
|
22
28
|
"DataSinkUpdateComponent",
|
|
@@ -24,9 +30,14 @@ __all__ = [
|
|
|
24
30
|
"DataSourceUpdateComponent",
|
|
25
31
|
"DataSourceUpdateComponentOne",
|
|
26
32
|
"DataSourceUpdateCustomMetadataValue",
|
|
33
|
+
"ExtractionSchemaCreateDataSchemaValue",
|
|
27
34
|
"ExtractionSchemaUpdateDataSchemaValue",
|
|
28
35
|
"FileCreateResourceInfoValue",
|
|
29
36
|
"PipelineFileUpdateCustomMetadataValue",
|
|
37
|
+
"PipelineUpdateTransformConfig",
|
|
38
|
+
"PipelineUpdateTransformConfig_Advanced",
|
|
39
|
+
"PipelineUpdateTransformConfig_Auto",
|
|
40
|
+
"auth",
|
|
30
41
|
"component_definitions",
|
|
31
42
|
"data_sinks",
|
|
32
43
|
"data_sources",
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import urllib.parse
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ...core.api_error import ApiError
|
|
7
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
9
|
+
from ...types.http_validation_error import HttpValidationError
|
|
10
|
+
from ...types.user import User
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
import pydantic
|
|
14
|
+
if pydantic.__version__.startswith("1."):
|
|
15
|
+
raise ImportError
|
|
16
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
17
|
+
except ImportError:
|
|
18
|
+
import pydantic # type: ignore
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AuthClient:
|
|
22
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
23
|
+
self._client_wrapper = client_wrapper
|
|
24
|
+
|
|
25
|
+
def login(self) -> None:
|
|
26
|
+
"""
|
|
27
|
+
from llama_cloud.client import LlamaCloud
|
|
28
|
+
|
|
29
|
+
client = LlamaCloud(
|
|
30
|
+
token="YOUR_TOKEN",
|
|
31
|
+
)
|
|
32
|
+
client.auth.login()
|
|
33
|
+
"""
|
|
34
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
35
|
+
"GET",
|
|
36
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/auth/login"),
|
|
37
|
+
headers=self._client_wrapper.get_headers(),
|
|
38
|
+
timeout=60,
|
|
39
|
+
)
|
|
40
|
+
if 200 <= _response.status_code < 300:
|
|
41
|
+
return
|
|
42
|
+
try:
|
|
43
|
+
_response_json = _response.json()
|
|
44
|
+
except JSONDecodeError:
|
|
45
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
46
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
47
|
+
|
|
48
|
+
def read_self(self) -> User:
|
|
49
|
+
"""
|
|
50
|
+
from llama_cloud.client import LlamaCloud
|
|
51
|
+
|
|
52
|
+
client = LlamaCloud(
|
|
53
|
+
token="YOUR_TOKEN",
|
|
54
|
+
)
|
|
55
|
+
client.auth.read_self()
|
|
56
|
+
"""
|
|
57
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
58
|
+
"GET",
|
|
59
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/auth/me"),
|
|
60
|
+
headers=self._client_wrapper.get_headers(),
|
|
61
|
+
timeout=60,
|
|
62
|
+
)
|
|
63
|
+
if 200 <= _response.status_code < 300:
|
|
64
|
+
return pydantic.parse_obj_as(User, _response.json()) # type: ignore
|
|
65
|
+
if _response.status_code == 422:
|
|
66
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
67
|
+
try:
|
|
68
|
+
_response_json = _response.json()
|
|
69
|
+
except JSONDecodeError:
|
|
70
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
71
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class AsyncAuthClient:
|
|
75
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
76
|
+
self._client_wrapper = client_wrapper
|
|
77
|
+
|
|
78
|
+
async def login(self) -> None:
|
|
79
|
+
"""
|
|
80
|
+
from llama_cloud.client import AsyncLlamaCloud
|
|
81
|
+
|
|
82
|
+
client = AsyncLlamaCloud(
|
|
83
|
+
token="YOUR_TOKEN",
|
|
84
|
+
)
|
|
85
|
+
await client.auth.login()
|
|
86
|
+
"""
|
|
87
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
88
|
+
"GET",
|
|
89
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/auth/login"),
|
|
90
|
+
headers=self._client_wrapper.get_headers(),
|
|
91
|
+
timeout=60,
|
|
92
|
+
)
|
|
93
|
+
if 200 <= _response.status_code < 300:
|
|
94
|
+
return
|
|
95
|
+
try:
|
|
96
|
+
_response_json = _response.json()
|
|
97
|
+
except JSONDecodeError:
|
|
98
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
99
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
100
|
+
|
|
101
|
+
async def read_self(self) -> User:
|
|
102
|
+
"""
|
|
103
|
+
from llama_cloud.client import AsyncLlamaCloud
|
|
104
|
+
|
|
105
|
+
client = AsyncLlamaCloud(
|
|
106
|
+
token="YOUR_TOKEN",
|
|
107
|
+
)
|
|
108
|
+
await client.auth.read_self()
|
|
109
|
+
"""
|
|
110
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
111
|
+
"GET",
|
|
112
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/auth/me"),
|
|
113
|
+
headers=self._client_wrapper.get_headers(),
|
|
114
|
+
timeout=60,
|
|
115
|
+
)
|
|
116
|
+
if 200 <= _response.status_code < 300:
|
|
117
|
+
return pydantic.parse_obj_as(User, _response.json()) # type: ignore
|
|
118
|
+
if _response.status_code == 422:
|
|
119
|
+
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
120
|
+
try:
|
|
121
|
+
_response_json = _response.json()
|
|
122
|
+
except JSONDecodeError:
|
|
123
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
124
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
@@ -4,6 +4,8 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
from ....types.cloud_azure_ai_search_vector_store import CloudAzureAiSearchVectorStore
|
|
6
6
|
from ....types.cloud_chroma_vector_store import CloudChromaVectorStore
|
|
7
|
+
from ....types.cloud_milvus_vector_store import CloudMilvusVectorStore
|
|
8
|
+
from ....types.cloud_mongo_db_atlas_vector_search import CloudMongoDbAtlasVectorSearch
|
|
7
9
|
from ....types.cloud_pinecone_vector_store import CloudPineconeVectorStore
|
|
8
10
|
from ....types.cloud_postgres_vector_store import CloudPostgresVectorStore
|
|
9
11
|
from ....types.cloud_qdrant_vector_store import CloudQdrantVectorStore
|
|
@@ -16,4 +18,6 @@ DataSinkUpdateComponentOne = typing.Union[
|
|
|
16
18
|
CloudQdrantVectorStore,
|
|
17
19
|
CloudWeaviateVectorStore,
|
|
18
20
|
CloudAzureAiSearchVectorStore,
|
|
21
|
+
CloudMongoDbAtlasVectorSearch,
|
|
22
|
+
CloudMilvusVectorStore,
|
|
19
23
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from .types import ExtractionSchemaUpdateDataSchemaValue
|
|
3
|
+
from .types import ExtractionSchemaCreateDataSchemaValue, ExtractionSchemaUpdateDataSchemaValue
|
|
4
4
|
|
|
5
|
-
__all__ = ["ExtractionSchemaUpdateDataSchemaValue"]
|
|
5
|
+
__all__ = ["ExtractionSchemaCreateDataSchemaValue", "ExtractionSchemaUpdateDataSchemaValue"]
|