llama-cloud 0.1.20__py3-none-any.whl → 0.1.22__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 (55) hide show
  1. llama_cloud/__init__.py +18 -136
  2. llama_cloud/client.py +3 -3
  3. llama_cloud/resources/__init__.py +4 -43
  4. llama_cloud/resources/admin/client.py +78 -0
  5. llama_cloud/resources/data_sinks/__init__.py +2 -18
  6. llama_cloud/resources/data_sinks/client.py +94 -2
  7. llama_cloud/resources/data_sinks/types/__init__.py +2 -18
  8. llama_cloud/resources/data_sinks/types/data_sink_update_component.py +7 -65
  9. llama_cloud/resources/data_sources/__init__.py +2 -30
  10. llama_cloud/resources/data_sources/types/__init__.py +1 -28
  11. llama_cloud/resources/data_sources/types/data_source_update_component.py +23 -2
  12. llama_cloud/resources/jobs/client.py +10 -2
  13. llama_cloud/resources/llama_extract/client.py +50 -6
  14. llama_cloud/resources/organizations/client.py +12 -2
  15. llama_cloud/resources/parsing/client.py +30 -0
  16. llama_cloud/resources/pipelines/client.py +22 -0
  17. llama_cloud/resources/retrievers/client.py +14 -0
  18. llama_cloud/types/__init__.py +18 -112
  19. llama_cloud/types/cloud_jira_data_source.py +4 -0
  20. llama_cloud/types/cloud_s_3_data_source.py +1 -0
  21. llama_cloud/types/data_sink_component.py +7 -65
  22. llama_cloud/types/data_sink_create_component.py +7 -65
  23. llama_cloud/types/data_source_component.py +23 -2
  24. llama_cloud/types/data_source_create_component.py +23 -2
  25. llama_cloud/types/{data_sink_definition.py → document_block.py} +6 -15
  26. llama_cloud/types/document_chunk_mode.py +17 -0
  27. llama_cloud/types/extract_config.py +7 -0
  28. llama_cloud/types/extract_mode.py +4 -0
  29. llama_cloud/types/extract_models.py +33 -0
  30. llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +11 -0
  31. llama_cloud/types/{data_source_definition.py → llm_config_result.py} +6 -15
  32. llama_cloud/types/llm_config_result_llm_type.py +33 -0
  33. llama_cloud/types/llm_configs_response.py +33 -0
  34. llama_cloud/types/pipeline.py +2 -0
  35. llama_cloud/types/pipeline_create.py +1 -3
  36. llama_cloud/types/pipeline_data_source_component.py +23 -2
  37. llama_cloud/types/pipeline_status.py +17 -0
  38. llama_cloud/types/prompt_conf.py +1 -0
  39. llama_cloud/types/struct_parse_conf.py +2 -1
  40. llama_cloud/types/supported_llm_model.py +1 -2
  41. llama_cloud/types/supported_llm_model_names.py +4 -4
  42. llama_cloud/types/user_organization_role.py +1 -0
  43. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/METADATA +5 -3
  44. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/RECORD +47 -49
  45. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/WHEEL +1 -1
  46. llama_cloud/resources/component_definitions/client.py +0 -189
  47. llama_cloud/resources/data_sources/types/data_source_update_component_one.py +0 -122
  48. llama_cloud/types/configurable_transformation_definition.py +0 -48
  49. llama_cloud/types/configurable_transformation_names.py +0 -41
  50. llama_cloud/types/data_source_component_one.py +0 -122
  51. llama_cloud/types/data_source_create_component_one.py +0 -122
  52. llama_cloud/types/pipeline_data_source_component_one.py +0 -122
  53. llama_cloud/types/transformation_category_names.py +0 -17
  54. /llama_cloud/resources/{component_definitions → admin}/__init__.py +0 -0
  55. {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/LICENSE +0 -0
llama_cloud/__init__.py CHANGED
@@ -60,57 +60,21 @@ from .types import (
60
60
  CompositeRetrievedTextNodeWithScore,
61
61
  ConfigurableDataSinkNames,
62
62
  ConfigurableDataSourceNames,
63
- ConfigurableTransformationDefinition,
64
- ConfigurableTransformationNames,
65
63
  CreditType,
66
64
  DataSink,
67
65
  DataSinkComponent,
68
- DataSinkComponent_AzureAiSearch,
69
- DataSinkComponent_Milvus,
70
- DataSinkComponent_MongodbAtlas,
71
- DataSinkComponent_Pinecone,
72
- DataSinkComponent_Postgres,
73
- DataSinkComponent_Qdrant,
74
66
  DataSinkCreate,
75
67
  DataSinkCreateComponent,
76
- DataSinkCreateComponent_AzureAiSearch,
77
- DataSinkCreateComponent_Milvus,
78
- DataSinkCreateComponent_MongodbAtlas,
79
- DataSinkCreateComponent_Pinecone,
80
- DataSinkCreateComponent_Postgres,
81
- DataSinkCreateComponent_Qdrant,
82
- DataSinkDefinition,
83
68
  DataSource,
84
69
  DataSourceComponent,
85
- DataSourceComponentOne,
86
- DataSourceComponentOne_AzureStorageBlob,
87
- DataSourceComponentOne_Box,
88
- DataSourceComponentOne_Confluence,
89
- DataSourceComponentOne_GoogleDrive,
90
- DataSourceComponentOne_Jira,
91
- DataSourceComponentOne_MicrosoftOnedrive,
92
- DataSourceComponentOne_MicrosoftSharepoint,
93
- DataSourceComponentOne_NotionPage,
94
- DataSourceComponentOne_S3,
95
- DataSourceComponentOne_Slack,
96
70
  DataSourceCreate,
97
71
  DataSourceCreateComponent,
98
- DataSourceCreateComponentOne,
99
- DataSourceCreateComponentOne_AzureStorageBlob,
100
- DataSourceCreateComponentOne_Box,
101
- DataSourceCreateComponentOne_Confluence,
102
- DataSourceCreateComponentOne_GoogleDrive,
103
- DataSourceCreateComponentOne_Jira,
104
- DataSourceCreateComponentOne_MicrosoftOnedrive,
105
- DataSourceCreateComponentOne_MicrosoftSharepoint,
106
- DataSourceCreateComponentOne_NotionPage,
107
- DataSourceCreateComponentOne_S3,
108
- DataSourceCreateComponentOne_Slack,
109
72
  DataSourceCreateCustomMetadataValue,
110
73
  DataSourceCustomMetadataValue,
111
- DataSourceDefinition,
112
74
  DataSourceUpdateDispatcherConfig,
113
75
  DeleteParams,
76
+ DocumentBlock,
77
+ DocumentChunkMode,
114
78
  DocumentIngestionJobParams,
115
79
  EditSuggestion,
116
80
  EditSuggestionBlocksItem,
@@ -142,6 +106,7 @@ from .types import (
142
106
  ExtractJobCreateDataSchemaOverride,
143
107
  ExtractJobCreateDataSchemaOverrideZeroValue,
144
108
  ExtractMode,
109
+ ExtractModels,
145
110
  ExtractResultset,
146
111
  ExtractResultsetData,
147
112
  ExtractResultsetDataItemValue,
@@ -195,10 +160,14 @@ from .types import (
195
160
  LlamaIndexCoreBaseLlmsTypesChatMessage,
196
161
  LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem,
197
162
  LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Audio,
163
+ LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Document,
198
164
  LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Image,
199
165
  LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Text,
200
166
  LlamaParseParameters,
201
167
  LlamaParseSupportedFileExtensions,
168
+ LlmConfigResult,
169
+ LlmConfigResultLlmType,
170
+ LlmConfigsResponse,
202
171
  LlmModelData,
203
172
  LlmParameters,
204
173
  LoadFilesJobConfig,
@@ -256,17 +225,6 @@ from .types import (
256
225
  PipelineCreateTransformConfig,
257
226
  PipelineDataSource,
258
227
  PipelineDataSourceComponent,
259
- PipelineDataSourceComponentOne,
260
- PipelineDataSourceComponentOne_AzureStorageBlob,
261
- PipelineDataSourceComponentOne_Box,
262
- PipelineDataSourceComponentOne_Confluence,
263
- PipelineDataSourceComponentOne_GoogleDrive,
264
- PipelineDataSourceComponentOne_Jira,
265
- PipelineDataSourceComponentOne_MicrosoftOnedrive,
266
- PipelineDataSourceComponentOne_MicrosoftSharepoint,
267
- PipelineDataSourceComponentOne_NotionPage,
268
- PipelineDataSourceComponentOne_S3,
269
- PipelineDataSourceComponentOne_Slack,
270
228
  PipelineDataSourceCreate,
271
229
  PipelineDataSourceCustomMetadataValue,
272
230
  PipelineDataSourceStatus,
@@ -291,6 +249,7 @@ from .types import (
291
249
  PipelineFileUpdaterConfig,
292
250
  PipelineManagedIngestionJobParams,
293
251
  PipelineMetadataConfig,
252
+ PipelineStatus,
294
253
  PipelineTransformConfig,
295
254
  PipelineTransformConfig_Advanced,
296
255
  PipelineTransformConfig_Auto,
@@ -348,7 +307,6 @@ from .types import (
348
307
  TextNodeRelationshipsValue,
349
308
  TextNodeWithScore,
350
309
  TokenChunkingConfig,
351
- TransformationCategoryNames,
352
310
  UsageAndPlan,
353
311
  UsageMetricResponse,
354
312
  UsageResponse,
@@ -367,24 +325,7 @@ from .types import (
367
325
  from .errors import UnprocessableEntityError
368
326
  from .resources import (
369
327
  DataSinkUpdateComponent,
370
- DataSinkUpdateComponent_AzureAiSearch,
371
- DataSinkUpdateComponent_Milvus,
372
- DataSinkUpdateComponent_MongodbAtlas,
373
- DataSinkUpdateComponent_Pinecone,
374
- DataSinkUpdateComponent_Postgres,
375
- DataSinkUpdateComponent_Qdrant,
376
328
  DataSourceUpdateComponent,
377
- DataSourceUpdateComponentOne,
378
- DataSourceUpdateComponentOne_AzureStorageBlob,
379
- DataSourceUpdateComponentOne_Box,
380
- DataSourceUpdateComponentOne_Confluence,
381
- DataSourceUpdateComponentOne_GoogleDrive,
382
- DataSourceUpdateComponentOne_Jira,
383
- DataSourceUpdateComponentOne_MicrosoftOnedrive,
384
- DataSourceUpdateComponentOne_MicrosoftSharepoint,
385
- DataSourceUpdateComponentOne_NotionPage,
386
- DataSourceUpdateComponentOne_S3,
387
- DataSourceUpdateComponentOne_Slack,
388
329
  DataSourceUpdateCustomMetadataValue,
389
330
  EmbeddingModelConfigCreateEmbeddingConfig,
390
331
  EmbeddingModelConfigCreateEmbeddingConfig_AzureEmbedding,
@@ -416,9 +357,9 @@ from .resources import (
416
357
  PipelineUpdateEmbeddingConfig_VertexaiEmbedding,
417
358
  PipelineUpdateTransformConfig,
418
359
  UpdateReportPlanApiV1ReportsReportIdPlanPatchRequestAction,
360
+ admin,
419
361
  beta,
420
362
  chat_apps,
421
- component_definitions,
422
363
  data_sinks,
423
364
  data_sources,
424
365
  embedding_model_configs,
@@ -495,77 +436,24 @@ __all__ = [
495
436
  "CompositeRetrievedTextNodeWithScore",
496
437
  "ConfigurableDataSinkNames",
497
438
  "ConfigurableDataSourceNames",
498
- "ConfigurableTransformationDefinition",
499
- "ConfigurableTransformationNames",
500
439
  "CreditType",
501
440
  "DataSink",
502
441
  "DataSinkComponent",
503
- "DataSinkComponent_AzureAiSearch",
504
- "DataSinkComponent_Milvus",
505
- "DataSinkComponent_MongodbAtlas",
506
- "DataSinkComponent_Pinecone",
507
- "DataSinkComponent_Postgres",
508
- "DataSinkComponent_Qdrant",
509
442
  "DataSinkCreate",
510
443
  "DataSinkCreateComponent",
511
- "DataSinkCreateComponent_AzureAiSearch",
512
- "DataSinkCreateComponent_Milvus",
513
- "DataSinkCreateComponent_MongodbAtlas",
514
- "DataSinkCreateComponent_Pinecone",
515
- "DataSinkCreateComponent_Postgres",
516
- "DataSinkCreateComponent_Qdrant",
517
- "DataSinkDefinition",
518
444
  "DataSinkUpdateComponent",
519
- "DataSinkUpdateComponent_AzureAiSearch",
520
- "DataSinkUpdateComponent_Milvus",
521
- "DataSinkUpdateComponent_MongodbAtlas",
522
- "DataSinkUpdateComponent_Pinecone",
523
- "DataSinkUpdateComponent_Postgres",
524
- "DataSinkUpdateComponent_Qdrant",
525
445
  "DataSource",
526
446
  "DataSourceComponent",
527
- "DataSourceComponentOne",
528
- "DataSourceComponentOne_AzureStorageBlob",
529
- "DataSourceComponentOne_Box",
530
- "DataSourceComponentOne_Confluence",
531
- "DataSourceComponentOne_GoogleDrive",
532
- "DataSourceComponentOne_Jira",
533
- "DataSourceComponentOne_MicrosoftOnedrive",
534
- "DataSourceComponentOne_MicrosoftSharepoint",
535
- "DataSourceComponentOne_NotionPage",
536
- "DataSourceComponentOne_S3",
537
- "DataSourceComponentOne_Slack",
538
447
  "DataSourceCreate",
539
448
  "DataSourceCreateComponent",
540
- "DataSourceCreateComponentOne",
541
- "DataSourceCreateComponentOne_AzureStorageBlob",
542
- "DataSourceCreateComponentOne_Box",
543
- "DataSourceCreateComponentOne_Confluence",
544
- "DataSourceCreateComponentOne_GoogleDrive",
545
- "DataSourceCreateComponentOne_Jira",
546
- "DataSourceCreateComponentOne_MicrosoftOnedrive",
547
- "DataSourceCreateComponentOne_MicrosoftSharepoint",
548
- "DataSourceCreateComponentOne_NotionPage",
549
- "DataSourceCreateComponentOne_S3",
550
- "DataSourceCreateComponentOne_Slack",
551
449
  "DataSourceCreateCustomMetadataValue",
552
450
  "DataSourceCustomMetadataValue",
553
- "DataSourceDefinition",
554
451
  "DataSourceUpdateComponent",
555
- "DataSourceUpdateComponentOne",
556
- "DataSourceUpdateComponentOne_AzureStorageBlob",
557
- "DataSourceUpdateComponentOne_Box",
558
- "DataSourceUpdateComponentOne_Confluence",
559
- "DataSourceUpdateComponentOne_GoogleDrive",
560
- "DataSourceUpdateComponentOne_Jira",
561
- "DataSourceUpdateComponentOne_MicrosoftOnedrive",
562
- "DataSourceUpdateComponentOne_MicrosoftSharepoint",
563
- "DataSourceUpdateComponentOne_NotionPage",
564
- "DataSourceUpdateComponentOne_S3",
565
- "DataSourceUpdateComponentOne_Slack",
566
452
  "DataSourceUpdateCustomMetadataValue",
567
453
  "DataSourceUpdateDispatcherConfig",
568
454
  "DeleteParams",
455
+ "DocumentBlock",
456
+ "DocumentChunkMode",
569
457
  "DocumentIngestionJobParams",
570
458
  "EditSuggestion",
571
459
  "EditSuggestionBlocksItem",
@@ -611,6 +499,7 @@ __all__ = [
611
499
  "ExtractJobCreateDataSchemaOverride",
612
500
  "ExtractJobCreateDataSchemaOverrideZeroValue",
613
501
  "ExtractMode",
502
+ "ExtractModels",
614
503
  "ExtractResultset",
615
504
  "ExtractResultsetData",
616
505
  "ExtractResultsetDataItemValue",
@@ -670,10 +559,14 @@ __all__ = [
670
559
  "LlamaIndexCoreBaseLlmsTypesChatMessage",
671
560
  "LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem",
672
561
  "LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Audio",
562
+ "LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Document",
673
563
  "LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Image",
674
564
  "LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem_Text",
675
565
  "LlamaParseParameters",
676
566
  "LlamaParseSupportedFileExtensions",
567
+ "LlmConfigResult",
568
+ "LlmConfigResultLlmType",
569
+ "LlmConfigsResponse",
677
570
  "LlmModelData",
678
571
  "LlmParameters",
679
572
  "LoadFilesJobConfig",
@@ -731,17 +624,6 @@ __all__ = [
731
624
  "PipelineCreateTransformConfig",
732
625
  "PipelineDataSource",
733
626
  "PipelineDataSourceComponent",
734
- "PipelineDataSourceComponentOne",
735
- "PipelineDataSourceComponentOne_AzureStorageBlob",
736
- "PipelineDataSourceComponentOne_Box",
737
- "PipelineDataSourceComponentOne_Confluence",
738
- "PipelineDataSourceComponentOne_GoogleDrive",
739
- "PipelineDataSourceComponentOne_Jira",
740
- "PipelineDataSourceComponentOne_MicrosoftOnedrive",
741
- "PipelineDataSourceComponentOne_MicrosoftSharepoint",
742
- "PipelineDataSourceComponentOne_NotionPage",
743
- "PipelineDataSourceComponentOne_S3",
744
- "PipelineDataSourceComponentOne_Slack",
745
627
  "PipelineDataSourceCreate",
746
628
  "PipelineDataSourceCustomMetadataValue",
747
629
  "PipelineDataSourceStatus",
@@ -767,6 +649,7 @@ __all__ = [
767
649
  "PipelineFileUpdaterConfig",
768
650
  "PipelineManagedIngestionJobParams",
769
651
  "PipelineMetadataConfig",
652
+ "PipelineStatus",
770
653
  "PipelineTransformConfig",
771
654
  "PipelineTransformConfig_Advanced",
772
655
  "PipelineTransformConfig_Auto",
@@ -833,7 +716,6 @@ __all__ = [
833
716
  "TextNodeRelationshipsValue",
834
717
  "TextNodeWithScore",
835
718
  "TokenChunkingConfig",
836
- "TransformationCategoryNames",
837
719
  "UnprocessableEntityError",
838
720
  "UpdateReportPlanApiV1ReportsReportIdPlanPatchRequestAction",
839
721
  "UsageAndPlan",
@@ -850,9 +732,9 @@ __all__ = [
850
732
  "VertexAiEmbeddingConfig",
851
733
  "VertexEmbeddingMode",
852
734
  "VertexTextEmbedding",
735
+ "admin",
853
736
  "beta",
854
737
  "chat_apps",
855
- "component_definitions",
856
738
  "data_sinks",
857
739
  "data_sources",
858
740
  "embedding_model_configs",
llama_cloud/client.py CHANGED
@@ -6,9 +6,9 @@ import httpx
6
6
 
7
7
  from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
8
  from .environment import LlamaCloudEnvironment
9
+ from .resources.admin.client import AdminClient, AsyncAdminClient
9
10
  from .resources.beta.client import AsyncBetaClient, BetaClient
10
11
  from .resources.chat_apps.client import AsyncChatAppsClient, ChatAppsClient
11
- from .resources.component_definitions.client import AsyncComponentDefinitionsClient, ComponentDefinitionsClient
12
12
  from .resources.data_sinks.client import AsyncDataSinksClient, DataSinksClient
13
13
  from .resources.data_sources.client import AsyncDataSourcesClient, DataSourcesClient
14
14
  from .resources.embedding_model_configs.client import AsyncEmbeddingModelConfigsClient, EmbeddingModelConfigsClient
@@ -50,8 +50,8 @@ class LlamaCloud:
50
50
  self.jobs = JobsClient(client_wrapper=self._client_wrapper)
51
51
  self.evals = EvalsClient(client_wrapper=self._client_wrapper)
52
52
  self.parsing = ParsingClient(client_wrapper=self._client_wrapper)
53
- self.component_definitions = ComponentDefinitionsClient(client_wrapper=self._client_wrapper)
54
53
  self.chat_apps = ChatAppsClient(client_wrapper=self._client_wrapper)
54
+ self.admin = AdminClient(client_wrapper=self._client_wrapper)
55
55
  self.llama_extract = LlamaExtractClient(client_wrapper=self._client_wrapper)
56
56
  self.reports = ReportsClient(client_wrapper=self._client_wrapper)
57
57
  self.beta = BetaClient(client_wrapper=self._client_wrapper)
@@ -83,8 +83,8 @@ class AsyncLlamaCloud:
83
83
  self.jobs = AsyncJobsClient(client_wrapper=self._client_wrapper)
84
84
  self.evals = AsyncEvalsClient(client_wrapper=self._client_wrapper)
85
85
  self.parsing = AsyncParsingClient(client_wrapper=self._client_wrapper)
86
- self.component_definitions = AsyncComponentDefinitionsClient(client_wrapper=self._client_wrapper)
87
86
  self.chat_apps = AsyncChatAppsClient(client_wrapper=self._client_wrapper)
87
+ self.admin = AsyncAdminClient(client_wrapper=self._client_wrapper)
88
88
  self.llama_extract = AsyncLlamaExtractClient(client_wrapper=self._client_wrapper)
89
89
  self.reports = AsyncReportsClient(client_wrapper=self._client_wrapper)
90
90
  self.beta = AsyncBetaClient(client_wrapper=self._client_wrapper)
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from . import (
4
+ admin,
4
5
  beta,
5
6
  chat_apps,
6
- component_definitions,
7
7
  data_sinks,
8
8
  data_sources,
9
9
  embedding_model_configs,
@@ -18,30 +18,8 @@ from . import (
18
18
  reports,
19
19
  retrievers,
20
20
  )
21
- from .data_sinks import (
22
- DataSinkUpdateComponent,
23
- DataSinkUpdateComponent_AzureAiSearch,
24
- DataSinkUpdateComponent_Milvus,
25
- DataSinkUpdateComponent_MongodbAtlas,
26
- DataSinkUpdateComponent_Pinecone,
27
- DataSinkUpdateComponent_Postgres,
28
- DataSinkUpdateComponent_Qdrant,
29
- )
30
- from .data_sources import (
31
- DataSourceUpdateComponent,
32
- DataSourceUpdateComponentOne,
33
- DataSourceUpdateComponentOne_AzureStorageBlob,
34
- DataSourceUpdateComponentOne_Box,
35
- DataSourceUpdateComponentOne_Confluence,
36
- DataSourceUpdateComponentOne_GoogleDrive,
37
- DataSourceUpdateComponentOne_Jira,
38
- DataSourceUpdateComponentOne_MicrosoftOnedrive,
39
- DataSourceUpdateComponentOne_MicrosoftSharepoint,
40
- DataSourceUpdateComponentOne_NotionPage,
41
- DataSourceUpdateComponentOne_S3,
42
- DataSourceUpdateComponentOne_Slack,
43
- DataSourceUpdateCustomMetadataValue,
44
- )
21
+ from .data_sinks import DataSinkUpdateComponent
22
+ from .data_sources import DataSourceUpdateComponent, DataSourceUpdateCustomMetadataValue
45
23
  from .embedding_model_configs import (
46
24
  EmbeddingModelConfigCreateEmbeddingConfig,
47
25
  EmbeddingModelConfigCreateEmbeddingConfig_AzureEmbedding,
@@ -79,24 +57,7 @@ from .reports import UpdateReportPlanApiV1ReportsReportIdPlanPatchRequestAction
79
57
 
80
58
  __all__ = [
81
59
  "DataSinkUpdateComponent",
82
- "DataSinkUpdateComponent_AzureAiSearch",
83
- "DataSinkUpdateComponent_Milvus",
84
- "DataSinkUpdateComponent_MongodbAtlas",
85
- "DataSinkUpdateComponent_Pinecone",
86
- "DataSinkUpdateComponent_Postgres",
87
- "DataSinkUpdateComponent_Qdrant",
88
60
  "DataSourceUpdateComponent",
89
- "DataSourceUpdateComponentOne",
90
- "DataSourceUpdateComponentOne_AzureStorageBlob",
91
- "DataSourceUpdateComponentOne_Box",
92
- "DataSourceUpdateComponentOne_Confluence",
93
- "DataSourceUpdateComponentOne_GoogleDrive",
94
- "DataSourceUpdateComponentOne_Jira",
95
- "DataSourceUpdateComponentOne_MicrosoftOnedrive",
96
- "DataSourceUpdateComponentOne_MicrosoftSharepoint",
97
- "DataSourceUpdateComponentOne_NotionPage",
98
- "DataSourceUpdateComponentOne_S3",
99
- "DataSourceUpdateComponentOne_Slack",
100
61
  "DataSourceUpdateCustomMetadataValue",
101
62
  "EmbeddingModelConfigCreateEmbeddingConfig",
102
63
  "EmbeddingModelConfigCreateEmbeddingConfig_AzureEmbedding",
@@ -128,9 +89,9 @@ __all__ = [
128
89
  "PipelineUpdateEmbeddingConfig_VertexaiEmbedding",
129
90
  "PipelineUpdateTransformConfig",
130
91
  "UpdateReportPlanApiV1ReportsReportIdPlanPatchRequestAction",
92
+ "admin",
131
93
  "beta",
132
94
  "chat_apps",
133
- "component_definitions",
134
95
  "data_sinks",
135
96
  "data_sources",
136
97
  "embedding_model_configs",
@@ -0,0 +1,78 @@
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.llm_configs_response import LlmConfigsResponse
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 AdminClient:
22
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
23
+ self._client_wrapper = client_wrapper
24
+
25
+ def get_llm_configs(self) -> LlmConfigsResponse:
26
+ """
27
+ from llama_cloud.client import LlamaCloud
28
+
29
+ client = LlamaCloud(
30
+ token="YOUR_TOKEN",
31
+ )
32
+ client.admin.get_llm_configs()
33
+ """
34
+ _response = self._client_wrapper.httpx_client.request(
35
+ "GET",
36
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/admin/llm-configs"),
37
+ headers=self._client_wrapper.get_headers(),
38
+ timeout=60,
39
+ )
40
+ if 200 <= _response.status_code < 300:
41
+ return pydantic.parse_obj_as(LlmConfigsResponse, _response.json()) # type: ignore
42
+ if _response.status_code == 422:
43
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
44
+ try:
45
+ _response_json = _response.json()
46
+ except JSONDecodeError:
47
+ raise ApiError(status_code=_response.status_code, body=_response.text)
48
+ raise ApiError(status_code=_response.status_code, body=_response_json)
49
+
50
+
51
+ class AsyncAdminClient:
52
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
53
+ self._client_wrapper = client_wrapper
54
+
55
+ async def get_llm_configs(self) -> LlmConfigsResponse:
56
+ """
57
+ from llama_cloud.client import AsyncLlamaCloud
58
+
59
+ client = AsyncLlamaCloud(
60
+ token="YOUR_TOKEN",
61
+ )
62
+ await client.admin.get_llm_configs()
63
+ """
64
+ _response = await self._client_wrapper.httpx_client.request(
65
+ "GET",
66
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/admin/llm-configs"),
67
+ headers=self._client_wrapper.get_headers(),
68
+ timeout=60,
69
+ )
70
+ if 200 <= _response.status_code < 300:
71
+ return pydantic.parse_obj_as(LlmConfigsResponse, _response.json()) # type: ignore
72
+ if _response.status_code == 422:
73
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
74
+ try:
75
+ _response_json = _response.json()
76
+ except JSONDecodeError:
77
+ raise ApiError(status_code=_response.status_code, body=_response.text)
78
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -1,21 +1,5 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .types import (
4
- DataSinkUpdateComponent,
5
- DataSinkUpdateComponent_AzureAiSearch,
6
- DataSinkUpdateComponent_Milvus,
7
- DataSinkUpdateComponent_MongodbAtlas,
8
- DataSinkUpdateComponent_Pinecone,
9
- DataSinkUpdateComponent_Postgres,
10
- DataSinkUpdateComponent_Qdrant,
11
- )
3
+ from .types import DataSinkUpdateComponent
12
4
 
13
- __all__ = [
14
- "DataSinkUpdateComponent",
15
- "DataSinkUpdateComponent_AzureAiSearch",
16
- "DataSinkUpdateComponent_Milvus",
17
- "DataSinkUpdateComponent_MongodbAtlas",
18
- "DataSinkUpdateComponent_Pinecone",
19
- "DataSinkUpdateComponent_Postgres",
20
- "DataSinkUpdateComponent_Qdrant",
21
- ]
5
+ __all__ = ["DataSinkUpdateComponent"]
@@ -82,6 +82,19 @@ class DataSinksClient:
82
82
  - organization_id: typing.Optional[str].
83
83
 
84
84
  - request: DataSinkCreate.
85
+ ---
86
+ from llama_cloud import ConfigurableDataSinkNames, DataSinkCreate
87
+ from llama_cloud.client import LlamaCloud
88
+
89
+ client = LlamaCloud(
90
+ token="YOUR_TOKEN",
91
+ )
92
+ client.data_sinks.create_data_sink(
93
+ request=DataSinkCreate(
94
+ name="string",
95
+ sink_type=ConfigurableDataSinkNames.PINECONE,
96
+ ),
97
+ )
85
98
  """
86
99
  _response = self._client_wrapper.httpx_client.request(
87
100
  "POST",
@@ -118,6 +131,19 @@ class DataSinksClient:
118
131
  - organization_id: typing.Optional[str].
119
132
 
120
133
  - request: DataSinkCreate.
134
+ ---
135
+ from llama_cloud import ConfigurableDataSinkNames, DataSinkCreate
136
+ from llama_cloud.client import LlamaCloud
137
+
138
+ client = LlamaCloud(
139
+ token="YOUR_TOKEN",
140
+ )
141
+ client.data_sinks.upsert_data_sink(
142
+ request=DataSinkCreate(
143
+ name="string",
144
+ sink_type=ConfigurableDataSinkNames.PINECONE,
145
+ ),
146
+ )
121
147
  """
122
148
  _response = self._client_wrapper.httpx_client.request(
123
149
  "PUT",
@@ -143,6 +169,15 @@ class DataSinksClient:
143
169
 
144
170
  Parameters:
145
171
  - data_sink_id: str.
172
+ ---
173
+ from llama_cloud.client import LlamaCloud
174
+
175
+ client = LlamaCloud(
176
+ token="YOUR_TOKEN",
177
+ )
178
+ client.data_sinks.get_data_sink(
179
+ data_sink_id="string",
180
+ )
146
181
  """
147
182
  _response = self._client_wrapper.httpx_client.request(
148
183
  "GET",
@@ -178,7 +213,18 @@ class DataSinksClient:
178
213
 
179
214
  - sink_type: ConfigurableDataSinkNames.
180
215
 
181
- - component: typing.Optional[DataSinkUpdateComponent].
216
+ - component: typing.Optional[DataSinkUpdateComponent]. Component that implements the data sink
217
+ ---
218
+ from llama_cloud import ConfigurableDataSinkNames
219
+ from llama_cloud.client import LlamaCloud
220
+
221
+ client = LlamaCloud(
222
+ token="YOUR_TOKEN",
223
+ )
224
+ client.data_sinks.update_data_sink(
225
+ data_sink_id="string",
226
+ sink_type=ConfigurableDataSinkNames.PINECONE,
227
+ )
182
228
  """
183
229
  _request: typing.Dict[str, typing.Any] = {"sink_type": sink_type}
184
230
  if name is not OMIT:
@@ -290,6 +336,19 @@ class AsyncDataSinksClient:
290
336
  - organization_id: typing.Optional[str].
291
337
 
292
338
  - request: DataSinkCreate.
339
+ ---
340
+ from llama_cloud import ConfigurableDataSinkNames, DataSinkCreate
341
+ from llama_cloud.client import AsyncLlamaCloud
342
+
343
+ client = AsyncLlamaCloud(
344
+ token="YOUR_TOKEN",
345
+ )
346
+ await client.data_sinks.create_data_sink(
347
+ request=DataSinkCreate(
348
+ name="string",
349
+ sink_type=ConfigurableDataSinkNames.PINECONE,
350
+ ),
351
+ )
293
352
  """
294
353
  _response = await self._client_wrapper.httpx_client.request(
295
354
  "POST",
@@ -326,6 +385,19 @@ class AsyncDataSinksClient:
326
385
  - organization_id: typing.Optional[str].
327
386
 
328
387
  - request: DataSinkCreate.
388
+ ---
389
+ from llama_cloud import ConfigurableDataSinkNames, DataSinkCreate
390
+ from llama_cloud.client import AsyncLlamaCloud
391
+
392
+ client = AsyncLlamaCloud(
393
+ token="YOUR_TOKEN",
394
+ )
395
+ await client.data_sinks.upsert_data_sink(
396
+ request=DataSinkCreate(
397
+ name="string",
398
+ sink_type=ConfigurableDataSinkNames.PINECONE,
399
+ ),
400
+ )
329
401
  """
330
402
  _response = await self._client_wrapper.httpx_client.request(
331
403
  "PUT",
@@ -351,6 +423,15 @@ class AsyncDataSinksClient:
351
423
 
352
424
  Parameters:
353
425
  - data_sink_id: str.
426
+ ---
427
+ from llama_cloud.client import AsyncLlamaCloud
428
+
429
+ client = AsyncLlamaCloud(
430
+ token="YOUR_TOKEN",
431
+ )
432
+ await client.data_sinks.get_data_sink(
433
+ data_sink_id="string",
434
+ )
354
435
  """
355
436
  _response = await self._client_wrapper.httpx_client.request(
356
437
  "GET",
@@ -386,7 +467,18 @@ class AsyncDataSinksClient:
386
467
 
387
468
  - sink_type: ConfigurableDataSinkNames.
388
469
 
389
- - component: typing.Optional[DataSinkUpdateComponent].
470
+ - component: typing.Optional[DataSinkUpdateComponent]. Component that implements the data sink
471
+ ---
472
+ from llama_cloud import ConfigurableDataSinkNames
473
+ from llama_cloud.client import AsyncLlamaCloud
474
+
475
+ client = AsyncLlamaCloud(
476
+ token="YOUR_TOKEN",
477
+ )
478
+ await client.data_sinks.update_data_sink(
479
+ data_sink_id="string",
480
+ sink_type=ConfigurableDataSinkNames.PINECONE,
481
+ )
390
482
  """
391
483
  _request: typing.Dict[str, typing.Any] = {"sink_type": sink_type}
392
484
  if name is not OMIT:
@@ -1,21 +1,5 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .data_sink_update_component import (
4
- DataSinkUpdateComponent,
5
- DataSinkUpdateComponent_AzureAiSearch,
6
- DataSinkUpdateComponent_Milvus,
7
- DataSinkUpdateComponent_MongodbAtlas,
8
- DataSinkUpdateComponent_Pinecone,
9
- DataSinkUpdateComponent_Postgres,
10
- DataSinkUpdateComponent_Qdrant,
11
- )
3
+ from .data_sink_update_component import DataSinkUpdateComponent
12
4
 
13
- __all__ = [
14
- "DataSinkUpdateComponent",
15
- "DataSinkUpdateComponent_AzureAiSearch",
16
- "DataSinkUpdateComponent_Milvus",
17
- "DataSinkUpdateComponent_MongodbAtlas",
18
- "DataSinkUpdateComponent_Pinecone",
19
- "DataSinkUpdateComponent_Postgres",
20
- "DataSinkUpdateComponent_Qdrant",
21
- ]
5
+ __all__ = ["DataSinkUpdateComponent"]