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.
- llama_cloud/__init__.py +18 -136
- llama_cloud/client.py +3 -3
- llama_cloud/resources/__init__.py +4 -43
- llama_cloud/resources/admin/client.py +78 -0
- llama_cloud/resources/data_sinks/__init__.py +2 -18
- llama_cloud/resources/data_sinks/client.py +94 -2
- llama_cloud/resources/data_sinks/types/__init__.py +2 -18
- llama_cloud/resources/data_sinks/types/data_sink_update_component.py +7 -65
- llama_cloud/resources/data_sources/__init__.py +2 -30
- llama_cloud/resources/data_sources/types/__init__.py +1 -28
- llama_cloud/resources/data_sources/types/data_source_update_component.py +23 -2
- llama_cloud/resources/jobs/client.py +10 -2
- llama_cloud/resources/llama_extract/client.py +50 -6
- llama_cloud/resources/organizations/client.py +12 -2
- llama_cloud/resources/parsing/client.py +30 -0
- llama_cloud/resources/pipelines/client.py +22 -0
- llama_cloud/resources/retrievers/client.py +14 -0
- llama_cloud/types/__init__.py +18 -112
- llama_cloud/types/cloud_jira_data_source.py +4 -0
- llama_cloud/types/cloud_s_3_data_source.py +1 -0
- llama_cloud/types/data_sink_component.py +7 -65
- llama_cloud/types/data_sink_create_component.py +7 -65
- llama_cloud/types/data_source_component.py +23 -2
- llama_cloud/types/data_source_create_component.py +23 -2
- llama_cloud/types/{data_sink_definition.py → document_block.py} +6 -15
- llama_cloud/types/document_chunk_mode.py +17 -0
- llama_cloud/types/extract_config.py +7 -0
- llama_cloud/types/extract_mode.py +4 -0
- llama_cloud/types/extract_models.py +33 -0
- llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +11 -0
- llama_cloud/types/{data_source_definition.py → llm_config_result.py} +6 -15
- llama_cloud/types/llm_config_result_llm_type.py +33 -0
- llama_cloud/types/llm_configs_response.py +33 -0
- llama_cloud/types/pipeline.py +2 -0
- llama_cloud/types/pipeline_create.py +1 -3
- llama_cloud/types/pipeline_data_source_component.py +23 -2
- llama_cloud/types/pipeline_status.py +17 -0
- llama_cloud/types/prompt_conf.py +1 -0
- llama_cloud/types/struct_parse_conf.py +2 -1
- llama_cloud/types/supported_llm_model.py +1 -2
- llama_cloud/types/supported_llm_model_names.py +4 -4
- llama_cloud/types/user_organization_role.py +1 -0
- {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/METADATA +5 -3
- {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/RECORD +47 -49
- {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/WHEEL +1 -1
- llama_cloud/resources/component_definitions/client.py +0 -189
- llama_cloud/resources/data_sources/types/data_source_update_component_one.py +0 -122
- llama_cloud/types/configurable_transformation_definition.py +0 -48
- llama_cloud/types/configurable_transformation_names.py +0 -41
- llama_cloud/types/data_source_component_one.py +0 -122
- llama_cloud/types/data_source_create_component_one.py +0 -122
- llama_cloud/types/pipeline_data_source_component_one.py +0 -122
- llama_cloud/types/transformation_category_names.py +0 -17
- /llama_cloud/resources/{component_definitions → admin}/__init__.py +0 -0
- {llama_cloud-0.1.20.dist-info → llama_cloud-0.1.22.dist-info}/LICENSE +0 -0
|
@@ -1,189 +0,0 @@
|
|
|
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 ...types.configurable_transformation_definition import ConfigurableTransformationDefinition
|
|
10
|
-
from ...types.data_sink_definition import DataSinkDefinition
|
|
11
|
-
from ...types.data_source_definition import DataSourceDefinition
|
|
12
|
-
|
|
13
|
-
try:
|
|
14
|
-
import pydantic
|
|
15
|
-
if pydantic.__version__.startswith("1."):
|
|
16
|
-
raise ImportError
|
|
17
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
18
|
-
except ImportError:
|
|
19
|
-
import pydantic # type: ignore
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class ComponentDefinitionsClient:
|
|
23
|
-
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
24
|
-
self._client_wrapper = client_wrapper
|
|
25
|
-
|
|
26
|
-
def list_transformation_definitions(self) -> typing.List[ConfigurableTransformationDefinition]:
|
|
27
|
-
"""
|
|
28
|
-
List transformation component definitions.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
from llama_cloud.client import LlamaCloud
|
|
32
|
-
|
|
33
|
-
client = LlamaCloud(
|
|
34
|
-
token="YOUR_TOKEN",
|
|
35
|
-
)
|
|
36
|
-
client.component_definitions.list_transformation_definitions()
|
|
37
|
-
"""
|
|
38
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
39
|
-
"GET",
|
|
40
|
-
urllib.parse.urljoin(
|
|
41
|
-
f"{self._client_wrapper.get_base_url()}/", "api/v1/component-definition/configurable-transformations"
|
|
42
|
-
),
|
|
43
|
-
headers=self._client_wrapper.get_headers(),
|
|
44
|
-
timeout=60,
|
|
45
|
-
)
|
|
46
|
-
if 200 <= _response.status_code < 300:
|
|
47
|
-
return pydantic.parse_obj_as(typing.List[ConfigurableTransformationDefinition], _response.json()) # type: ignore
|
|
48
|
-
try:
|
|
49
|
-
_response_json = _response.json()
|
|
50
|
-
except JSONDecodeError:
|
|
51
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
52
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
53
|
-
|
|
54
|
-
def list_data_source_definitions(self) -> typing.List[DataSourceDefinition]:
|
|
55
|
-
"""
|
|
56
|
-
List data source component definitions.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
from llama_cloud.client import LlamaCloud
|
|
60
|
-
|
|
61
|
-
client = LlamaCloud(
|
|
62
|
-
token="YOUR_TOKEN",
|
|
63
|
-
)
|
|
64
|
-
client.component_definitions.list_data_source_definitions()
|
|
65
|
-
"""
|
|
66
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
67
|
-
"GET",
|
|
68
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/component-definition/data-sources"),
|
|
69
|
-
headers=self._client_wrapper.get_headers(),
|
|
70
|
-
timeout=60,
|
|
71
|
-
)
|
|
72
|
-
if 200 <= _response.status_code < 300:
|
|
73
|
-
return pydantic.parse_obj_as(typing.List[DataSourceDefinition], _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)
|
|
79
|
-
|
|
80
|
-
def list_data_sink_definitions(self) -> typing.List[DataSinkDefinition]:
|
|
81
|
-
"""
|
|
82
|
-
List data sink component definitions.
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
from llama_cloud.client import LlamaCloud
|
|
86
|
-
|
|
87
|
-
client = LlamaCloud(
|
|
88
|
-
token="YOUR_TOKEN",
|
|
89
|
-
)
|
|
90
|
-
client.component_definitions.list_data_sink_definitions()
|
|
91
|
-
"""
|
|
92
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
93
|
-
"GET",
|
|
94
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/component-definition/data-sinks"),
|
|
95
|
-
headers=self._client_wrapper.get_headers(),
|
|
96
|
-
timeout=60,
|
|
97
|
-
)
|
|
98
|
-
if 200 <= _response.status_code < 300:
|
|
99
|
-
return pydantic.parse_obj_as(typing.List[DataSinkDefinition], _response.json()) # type: ignore
|
|
100
|
-
try:
|
|
101
|
-
_response_json = _response.json()
|
|
102
|
-
except JSONDecodeError:
|
|
103
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
104
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
class AsyncComponentDefinitionsClient:
|
|
108
|
-
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
109
|
-
self._client_wrapper = client_wrapper
|
|
110
|
-
|
|
111
|
-
async def list_transformation_definitions(self) -> typing.List[ConfigurableTransformationDefinition]:
|
|
112
|
-
"""
|
|
113
|
-
List transformation component definitions.
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
from llama_cloud.client import AsyncLlamaCloud
|
|
117
|
-
|
|
118
|
-
client = AsyncLlamaCloud(
|
|
119
|
-
token="YOUR_TOKEN",
|
|
120
|
-
)
|
|
121
|
-
await client.component_definitions.list_transformation_definitions()
|
|
122
|
-
"""
|
|
123
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
124
|
-
"GET",
|
|
125
|
-
urllib.parse.urljoin(
|
|
126
|
-
f"{self._client_wrapper.get_base_url()}/", "api/v1/component-definition/configurable-transformations"
|
|
127
|
-
),
|
|
128
|
-
headers=self._client_wrapper.get_headers(),
|
|
129
|
-
timeout=60,
|
|
130
|
-
)
|
|
131
|
-
if 200 <= _response.status_code < 300:
|
|
132
|
-
return pydantic.parse_obj_as(typing.List[ConfigurableTransformationDefinition], _response.json()) # type: ignore
|
|
133
|
-
try:
|
|
134
|
-
_response_json = _response.json()
|
|
135
|
-
except JSONDecodeError:
|
|
136
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
137
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
138
|
-
|
|
139
|
-
async def list_data_source_definitions(self) -> typing.List[DataSourceDefinition]:
|
|
140
|
-
"""
|
|
141
|
-
List data source component definitions.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
from llama_cloud.client import AsyncLlamaCloud
|
|
145
|
-
|
|
146
|
-
client = AsyncLlamaCloud(
|
|
147
|
-
token="YOUR_TOKEN",
|
|
148
|
-
)
|
|
149
|
-
await client.component_definitions.list_data_source_definitions()
|
|
150
|
-
"""
|
|
151
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
152
|
-
"GET",
|
|
153
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/component-definition/data-sources"),
|
|
154
|
-
headers=self._client_wrapper.get_headers(),
|
|
155
|
-
timeout=60,
|
|
156
|
-
)
|
|
157
|
-
if 200 <= _response.status_code < 300:
|
|
158
|
-
return pydantic.parse_obj_as(typing.List[DataSourceDefinition], _response.json()) # type: ignore
|
|
159
|
-
try:
|
|
160
|
-
_response_json = _response.json()
|
|
161
|
-
except JSONDecodeError:
|
|
162
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
163
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
164
|
-
|
|
165
|
-
async def list_data_sink_definitions(self) -> typing.List[DataSinkDefinition]:
|
|
166
|
-
"""
|
|
167
|
-
List data sink component definitions.
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
from llama_cloud.client import AsyncLlamaCloud
|
|
171
|
-
|
|
172
|
-
client = AsyncLlamaCloud(
|
|
173
|
-
token="YOUR_TOKEN",
|
|
174
|
-
)
|
|
175
|
-
await client.component_definitions.list_data_sink_definitions()
|
|
176
|
-
"""
|
|
177
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
178
|
-
"GET",
|
|
179
|
-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/component-definition/data-sinks"),
|
|
180
|
-
headers=self._client_wrapper.get_headers(),
|
|
181
|
-
timeout=60,
|
|
182
|
-
)
|
|
183
|
-
if 200 <= _response.status_code < 300:
|
|
184
|
-
return pydantic.parse_obj_as(typing.List[DataSinkDefinition], _response.json()) # type: ignore
|
|
185
|
-
try:
|
|
186
|
-
_response_json = _response.json()
|
|
187
|
-
except JSONDecodeError:
|
|
188
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
189
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import typing
|
|
6
|
-
|
|
7
|
-
import typing_extensions
|
|
8
|
-
|
|
9
|
-
from ....types.cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
|
|
10
|
-
from ....types.cloud_box_data_source import CloudBoxDataSource
|
|
11
|
-
from ....types.cloud_confluence_data_source import CloudConfluenceDataSource
|
|
12
|
-
from ....types.cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
13
|
-
from ....types.cloud_jira_data_source import CloudJiraDataSource
|
|
14
|
-
from ....types.cloud_notion_page_data_source import CloudNotionPageDataSource
|
|
15
|
-
from ....types.cloud_one_drive_data_source import CloudOneDriveDataSource
|
|
16
|
-
from ....types.cloud_s_3_data_source import CloudS3DataSource
|
|
17
|
-
from ....types.cloud_sharepoint_data_source import CloudSharepointDataSource
|
|
18
|
-
from ....types.cloud_slack_data_source import CloudSlackDataSource
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class DataSourceUpdateComponentOne_AzureStorageBlob(CloudAzStorageBlobDataSource):
|
|
22
|
-
type: typing_extensions.Literal["AZURE_STORAGE_BLOB"]
|
|
23
|
-
|
|
24
|
-
class Config:
|
|
25
|
-
frozen = True
|
|
26
|
-
smart_union = True
|
|
27
|
-
allow_population_by_field_name = True
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class DataSourceUpdateComponentOne_Box(CloudBoxDataSource):
|
|
31
|
-
type: typing_extensions.Literal["BOX"]
|
|
32
|
-
|
|
33
|
-
class Config:
|
|
34
|
-
frozen = True
|
|
35
|
-
smart_union = True
|
|
36
|
-
allow_population_by_field_name = True
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class DataSourceUpdateComponentOne_Confluence(CloudConfluenceDataSource):
|
|
40
|
-
type: typing_extensions.Literal["CONFLUENCE"]
|
|
41
|
-
|
|
42
|
-
class Config:
|
|
43
|
-
frozen = True
|
|
44
|
-
smart_union = True
|
|
45
|
-
allow_population_by_field_name = True
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class DataSourceUpdateComponentOne_GoogleDrive(CloudGoogleDriveDataSource):
|
|
49
|
-
type: typing_extensions.Literal["GOOGLE_DRIVE"]
|
|
50
|
-
|
|
51
|
-
class Config:
|
|
52
|
-
frozen = True
|
|
53
|
-
smart_union = True
|
|
54
|
-
allow_population_by_field_name = True
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class DataSourceUpdateComponentOne_Jira(CloudJiraDataSource):
|
|
58
|
-
type: typing_extensions.Literal["JIRA"]
|
|
59
|
-
|
|
60
|
-
class Config:
|
|
61
|
-
frozen = True
|
|
62
|
-
smart_union = True
|
|
63
|
-
allow_population_by_field_name = True
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class DataSourceUpdateComponentOne_MicrosoftOnedrive(CloudOneDriveDataSource):
|
|
67
|
-
type: typing_extensions.Literal["MICROSOFT_ONEDRIVE"]
|
|
68
|
-
|
|
69
|
-
class Config:
|
|
70
|
-
frozen = True
|
|
71
|
-
smart_union = True
|
|
72
|
-
allow_population_by_field_name = True
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class DataSourceUpdateComponentOne_MicrosoftSharepoint(CloudSharepointDataSource):
|
|
76
|
-
type: typing_extensions.Literal["MICROSOFT_SHAREPOINT"]
|
|
77
|
-
|
|
78
|
-
class Config:
|
|
79
|
-
frozen = True
|
|
80
|
-
smart_union = True
|
|
81
|
-
allow_population_by_field_name = True
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class DataSourceUpdateComponentOne_NotionPage(CloudNotionPageDataSource):
|
|
85
|
-
type: typing_extensions.Literal["NOTION_PAGE"]
|
|
86
|
-
|
|
87
|
-
class Config:
|
|
88
|
-
frozen = True
|
|
89
|
-
smart_union = True
|
|
90
|
-
allow_population_by_field_name = True
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class DataSourceUpdateComponentOne_S3(CloudS3DataSource):
|
|
94
|
-
type: typing_extensions.Literal["S3"]
|
|
95
|
-
|
|
96
|
-
class Config:
|
|
97
|
-
frozen = True
|
|
98
|
-
smart_union = True
|
|
99
|
-
allow_population_by_field_name = True
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class DataSourceUpdateComponentOne_Slack(CloudSlackDataSource):
|
|
103
|
-
type: typing_extensions.Literal["SLACK"]
|
|
104
|
-
|
|
105
|
-
class Config:
|
|
106
|
-
frozen = True
|
|
107
|
-
smart_union = True
|
|
108
|
-
allow_population_by_field_name = True
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
DataSourceUpdateComponentOne = typing.Union[
|
|
112
|
-
DataSourceUpdateComponentOne_AzureStorageBlob,
|
|
113
|
-
DataSourceUpdateComponentOne_Box,
|
|
114
|
-
DataSourceUpdateComponentOne_Confluence,
|
|
115
|
-
DataSourceUpdateComponentOne_GoogleDrive,
|
|
116
|
-
DataSourceUpdateComponentOne_Jira,
|
|
117
|
-
DataSourceUpdateComponentOne_MicrosoftOnedrive,
|
|
118
|
-
DataSourceUpdateComponentOne_MicrosoftSharepoint,
|
|
119
|
-
DataSourceUpdateComponentOne_NotionPage,
|
|
120
|
-
DataSourceUpdateComponentOne_S3,
|
|
121
|
-
DataSourceUpdateComponentOne_Slack,
|
|
122
|
-
]
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import datetime as dt
|
|
4
|
-
import typing
|
|
5
|
-
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from .configurable_transformation_names import ConfigurableTransformationNames
|
|
8
|
-
from .transformation_category_names import TransformationCategoryNames
|
|
9
|
-
|
|
10
|
-
try:
|
|
11
|
-
import pydantic
|
|
12
|
-
if pydantic.__version__.startswith("1."):
|
|
13
|
-
raise ImportError
|
|
14
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
15
|
-
except ImportError:
|
|
16
|
-
import pydantic # type: ignore
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class ConfigurableTransformationDefinition(pydantic.BaseModel):
|
|
20
|
-
"""
|
|
21
|
-
Schema for a transformation definition.
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
label: str = pydantic.Field(
|
|
25
|
-
description="The label field will be used to display the name of the component in the UI"
|
|
26
|
-
)
|
|
27
|
-
json_schema: typing.Dict[str, typing.Any] = pydantic.Field(
|
|
28
|
-
description="The json_schema field can be used by clients to determine how to construct the component"
|
|
29
|
-
)
|
|
30
|
-
configurable_transformation_type: ConfigurableTransformationNames = pydantic.Field(
|
|
31
|
-
description="The name field will act as the unique identifier of TransformationDefinition objects"
|
|
32
|
-
)
|
|
33
|
-
transformation_category: TransformationCategoryNames = pydantic.Field(
|
|
34
|
-
description="The transformation_category field will be used to group transformations in the UI"
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
def json(self, **kwargs: typing.Any) -> str:
|
|
38
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
39
|
-
return super().json(**kwargs_with_defaults)
|
|
40
|
-
|
|
41
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
42
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
43
|
-
return super().dict(**kwargs_with_defaults)
|
|
44
|
-
|
|
45
|
-
class Config:
|
|
46
|
-
frozen = True
|
|
47
|
-
smart_union = True
|
|
48
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import enum
|
|
4
|
-
import typing
|
|
5
|
-
|
|
6
|
-
T_Result = typing.TypeVar("T_Result")
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class ConfigurableTransformationNames(str, enum.Enum):
|
|
10
|
-
CHARACTER_SPLITTER = "CHARACTER_SPLITTER"
|
|
11
|
-
PAGE_SPLITTER_NODE_PARSER = "PAGE_SPLITTER_NODE_PARSER"
|
|
12
|
-
CODE_NODE_PARSER = "CODE_NODE_PARSER"
|
|
13
|
-
SENTENCE_AWARE_NODE_PARSER = "SENTENCE_AWARE_NODE_PARSER"
|
|
14
|
-
TOKEN_AWARE_NODE_PARSER = "TOKEN_AWARE_NODE_PARSER"
|
|
15
|
-
MARKDOWN_NODE_PARSER = "MARKDOWN_NODE_PARSER"
|
|
16
|
-
MARKDOWN_ELEMENT_NODE_PARSER = "MARKDOWN_ELEMENT_NODE_PARSER"
|
|
17
|
-
|
|
18
|
-
def visit(
|
|
19
|
-
self,
|
|
20
|
-
character_splitter: typing.Callable[[], T_Result],
|
|
21
|
-
page_splitter_node_parser: typing.Callable[[], T_Result],
|
|
22
|
-
code_node_parser: typing.Callable[[], T_Result],
|
|
23
|
-
sentence_aware_node_parser: typing.Callable[[], T_Result],
|
|
24
|
-
token_aware_node_parser: typing.Callable[[], T_Result],
|
|
25
|
-
markdown_node_parser: typing.Callable[[], T_Result],
|
|
26
|
-
markdown_element_node_parser: typing.Callable[[], T_Result],
|
|
27
|
-
) -> T_Result:
|
|
28
|
-
if self is ConfigurableTransformationNames.CHARACTER_SPLITTER:
|
|
29
|
-
return character_splitter()
|
|
30
|
-
if self is ConfigurableTransformationNames.PAGE_SPLITTER_NODE_PARSER:
|
|
31
|
-
return page_splitter_node_parser()
|
|
32
|
-
if self is ConfigurableTransformationNames.CODE_NODE_PARSER:
|
|
33
|
-
return code_node_parser()
|
|
34
|
-
if self is ConfigurableTransformationNames.SENTENCE_AWARE_NODE_PARSER:
|
|
35
|
-
return sentence_aware_node_parser()
|
|
36
|
-
if self is ConfigurableTransformationNames.TOKEN_AWARE_NODE_PARSER:
|
|
37
|
-
return token_aware_node_parser()
|
|
38
|
-
if self is ConfigurableTransformationNames.MARKDOWN_NODE_PARSER:
|
|
39
|
-
return markdown_node_parser()
|
|
40
|
-
if self is ConfigurableTransformationNames.MARKDOWN_ELEMENT_NODE_PARSER:
|
|
41
|
-
return markdown_element_node_parser()
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import typing
|
|
6
|
-
|
|
7
|
-
import typing_extensions
|
|
8
|
-
|
|
9
|
-
from .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
|
|
10
|
-
from .cloud_box_data_source import CloudBoxDataSource
|
|
11
|
-
from .cloud_confluence_data_source import CloudConfluenceDataSource
|
|
12
|
-
from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
13
|
-
from .cloud_jira_data_source import CloudJiraDataSource
|
|
14
|
-
from .cloud_notion_page_data_source import CloudNotionPageDataSource
|
|
15
|
-
from .cloud_one_drive_data_source import CloudOneDriveDataSource
|
|
16
|
-
from .cloud_s_3_data_source import CloudS3DataSource
|
|
17
|
-
from .cloud_sharepoint_data_source import CloudSharepointDataSource
|
|
18
|
-
from .cloud_slack_data_source import CloudSlackDataSource
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class DataSourceComponentOne_AzureStorageBlob(CloudAzStorageBlobDataSource):
|
|
22
|
-
type: typing_extensions.Literal["AZURE_STORAGE_BLOB"]
|
|
23
|
-
|
|
24
|
-
class Config:
|
|
25
|
-
frozen = True
|
|
26
|
-
smart_union = True
|
|
27
|
-
allow_population_by_field_name = True
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class DataSourceComponentOne_Box(CloudBoxDataSource):
|
|
31
|
-
type: typing_extensions.Literal["BOX"]
|
|
32
|
-
|
|
33
|
-
class Config:
|
|
34
|
-
frozen = True
|
|
35
|
-
smart_union = True
|
|
36
|
-
allow_population_by_field_name = True
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class DataSourceComponentOne_Confluence(CloudConfluenceDataSource):
|
|
40
|
-
type: typing_extensions.Literal["CONFLUENCE"]
|
|
41
|
-
|
|
42
|
-
class Config:
|
|
43
|
-
frozen = True
|
|
44
|
-
smart_union = True
|
|
45
|
-
allow_population_by_field_name = True
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class DataSourceComponentOne_GoogleDrive(CloudGoogleDriveDataSource):
|
|
49
|
-
type: typing_extensions.Literal["GOOGLE_DRIVE"]
|
|
50
|
-
|
|
51
|
-
class Config:
|
|
52
|
-
frozen = True
|
|
53
|
-
smart_union = True
|
|
54
|
-
allow_population_by_field_name = True
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class DataSourceComponentOne_Jira(CloudJiraDataSource):
|
|
58
|
-
type: typing_extensions.Literal["JIRA"]
|
|
59
|
-
|
|
60
|
-
class Config:
|
|
61
|
-
frozen = True
|
|
62
|
-
smart_union = True
|
|
63
|
-
allow_population_by_field_name = True
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class DataSourceComponentOne_MicrosoftOnedrive(CloudOneDriveDataSource):
|
|
67
|
-
type: typing_extensions.Literal["MICROSOFT_ONEDRIVE"]
|
|
68
|
-
|
|
69
|
-
class Config:
|
|
70
|
-
frozen = True
|
|
71
|
-
smart_union = True
|
|
72
|
-
allow_population_by_field_name = True
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class DataSourceComponentOne_MicrosoftSharepoint(CloudSharepointDataSource):
|
|
76
|
-
type: typing_extensions.Literal["MICROSOFT_SHAREPOINT"]
|
|
77
|
-
|
|
78
|
-
class Config:
|
|
79
|
-
frozen = True
|
|
80
|
-
smart_union = True
|
|
81
|
-
allow_population_by_field_name = True
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class DataSourceComponentOne_NotionPage(CloudNotionPageDataSource):
|
|
85
|
-
type: typing_extensions.Literal["NOTION_PAGE"]
|
|
86
|
-
|
|
87
|
-
class Config:
|
|
88
|
-
frozen = True
|
|
89
|
-
smart_union = True
|
|
90
|
-
allow_population_by_field_name = True
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class DataSourceComponentOne_S3(CloudS3DataSource):
|
|
94
|
-
type: typing_extensions.Literal["S3"]
|
|
95
|
-
|
|
96
|
-
class Config:
|
|
97
|
-
frozen = True
|
|
98
|
-
smart_union = True
|
|
99
|
-
allow_population_by_field_name = True
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class DataSourceComponentOne_Slack(CloudSlackDataSource):
|
|
103
|
-
type: typing_extensions.Literal["SLACK"]
|
|
104
|
-
|
|
105
|
-
class Config:
|
|
106
|
-
frozen = True
|
|
107
|
-
smart_union = True
|
|
108
|
-
allow_population_by_field_name = True
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
DataSourceComponentOne = typing.Union[
|
|
112
|
-
DataSourceComponentOne_AzureStorageBlob,
|
|
113
|
-
DataSourceComponentOne_Box,
|
|
114
|
-
DataSourceComponentOne_Confluence,
|
|
115
|
-
DataSourceComponentOne_GoogleDrive,
|
|
116
|
-
DataSourceComponentOne_Jira,
|
|
117
|
-
DataSourceComponentOne_MicrosoftOnedrive,
|
|
118
|
-
DataSourceComponentOne_MicrosoftSharepoint,
|
|
119
|
-
DataSourceComponentOne_NotionPage,
|
|
120
|
-
DataSourceComponentOne_S3,
|
|
121
|
-
DataSourceComponentOne_Slack,
|
|
122
|
-
]
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import typing
|
|
6
|
-
|
|
7
|
-
import typing_extensions
|
|
8
|
-
|
|
9
|
-
from .cloud_az_storage_blob_data_source import CloudAzStorageBlobDataSource
|
|
10
|
-
from .cloud_box_data_source import CloudBoxDataSource
|
|
11
|
-
from .cloud_confluence_data_source import CloudConfluenceDataSource
|
|
12
|
-
from .cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
13
|
-
from .cloud_jira_data_source import CloudJiraDataSource
|
|
14
|
-
from .cloud_notion_page_data_source import CloudNotionPageDataSource
|
|
15
|
-
from .cloud_one_drive_data_source import CloudOneDriveDataSource
|
|
16
|
-
from .cloud_s_3_data_source import CloudS3DataSource
|
|
17
|
-
from .cloud_sharepoint_data_source import CloudSharepointDataSource
|
|
18
|
-
from .cloud_slack_data_source import CloudSlackDataSource
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class DataSourceCreateComponentOne_AzureStorageBlob(CloudAzStorageBlobDataSource):
|
|
22
|
-
type: typing_extensions.Literal["AZURE_STORAGE_BLOB"]
|
|
23
|
-
|
|
24
|
-
class Config:
|
|
25
|
-
frozen = True
|
|
26
|
-
smart_union = True
|
|
27
|
-
allow_population_by_field_name = True
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class DataSourceCreateComponentOne_Box(CloudBoxDataSource):
|
|
31
|
-
type: typing_extensions.Literal["BOX"]
|
|
32
|
-
|
|
33
|
-
class Config:
|
|
34
|
-
frozen = True
|
|
35
|
-
smart_union = True
|
|
36
|
-
allow_population_by_field_name = True
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class DataSourceCreateComponentOne_Confluence(CloudConfluenceDataSource):
|
|
40
|
-
type: typing_extensions.Literal["CONFLUENCE"]
|
|
41
|
-
|
|
42
|
-
class Config:
|
|
43
|
-
frozen = True
|
|
44
|
-
smart_union = True
|
|
45
|
-
allow_population_by_field_name = True
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class DataSourceCreateComponentOne_GoogleDrive(CloudGoogleDriveDataSource):
|
|
49
|
-
type: typing_extensions.Literal["GOOGLE_DRIVE"]
|
|
50
|
-
|
|
51
|
-
class Config:
|
|
52
|
-
frozen = True
|
|
53
|
-
smart_union = True
|
|
54
|
-
allow_population_by_field_name = True
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class DataSourceCreateComponentOne_Jira(CloudJiraDataSource):
|
|
58
|
-
type: typing_extensions.Literal["JIRA"]
|
|
59
|
-
|
|
60
|
-
class Config:
|
|
61
|
-
frozen = True
|
|
62
|
-
smart_union = True
|
|
63
|
-
allow_population_by_field_name = True
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class DataSourceCreateComponentOne_MicrosoftOnedrive(CloudOneDriveDataSource):
|
|
67
|
-
type: typing_extensions.Literal["MICROSOFT_ONEDRIVE"]
|
|
68
|
-
|
|
69
|
-
class Config:
|
|
70
|
-
frozen = True
|
|
71
|
-
smart_union = True
|
|
72
|
-
allow_population_by_field_name = True
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class DataSourceCreateComponentOne_MicrosoftSharepoint(CloudSharepointDataSource):
|
|
76
|
-
type: typing_extensions.Literal["MICROSOFT_SHAREPOINT"]
|
|
77
|
-
|
|
78
|
-
class Config:
|
|
79
|
-
frozen = True
|
|
80
|
-
smart_union = True
|
|
81
|
-
allow_population_by_field_name = True
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class DataSourceCreateComponentOne_NotionPage(CloudNotionPageDataSource):
|
|
85
|
-
type: typing_extensions.Literal["NOTION_PAGE"]
|
|
86
|
-
|
|
87
|
-
class Config:
|
|
88
|
-
frozen = True
|
|
89
|
-
smart_union = True
|
|
90
|
-
allow_population_by_field_name = True
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class DataSourceCreateComponentOne_S3(CloudS3DataSource):
|
|
94
|
-
type: typing_extensions.Literal["S3"]
|
|
95
|
-
|
|
96
|
-
class Config:
|
|
97
|
-
frozen = True
|
|
98
|
-
smart_union = True
|
|
99
|
-
allow_population_by_field_name = True
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class DataSourceCreateComponentOne_Slack(CloudSlackDataSource):
|
|
103
|
-
type: typing_extensions.Literal["SLACK"]
|
|
104
|
-
|
|
105
|
-
class Config:
|
|
106
|
-
frozen = True
|
|
107
|
-
smart_union = True
|
|
108
|
-
allow_population_by_field_name = True
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
DataSourceCreateComponentOne = typing.Union[
|
|
112
|
-
DataSourceCreateComponentOne_AzureStorageBlob,
|
|
113
|
-
DataSourceCreateComponentOne_Box,
|
|
114
|
-
DataSourceCreateComponentOne_Confluence,
|
|
115
|
-
DataSourceCreateComponentOne_GoogleDrive,
|
|
116
|
-
DataSourceCreateComponentOne_Jira,
|
|
117
|
-
DataSourceCreateComponentOne_MicrosoftOnedrive,
|
|
118
|
-
DataSourceCreateComponentOne_MicrosoftSharepoint,
|
|
119
|
-
DataSourceCreateComponentOne_NotionPage,
|
|
120
|
-
DataSourceCreateComponentOne_S3,
|
|
121
|
-
DataSourceCreateComponentOne_Slack,
|
|
122
|
-
]
|