llama-cloud 0.1.18__py3-none-any.whl → 0.1.20__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 +202 -42
- llama_cloud/client.py +3 -0
- llama_cloud/resources/__init__.py +61 -2
- llama_cloud/resources/beta/__init__.py +2 -0
- llama_cloud/resources/beta/client.py +371 -0
- llama_cloud/resources/data_sinks/__init__.py +18 -2
- llama_cloud/resources/data_sinks/client.py +2 -94
- llama_cloud/resources/data_sinks/types/__init__.py +18 -2
- llama_cloud/resources/data_sinks/types/data_sink_update_component.py +65 -7
- llama_cloud/resources/data_sources/__init__.py +30 -2
- llama_cloud/resources/data_sources/types/__init__.py +28 -1
- llama_cloud/resources/data_sources/types/data_source_update_component.py +2 -23
- llama_cloud/resources/data_sources/types/data_source_update_component_one.py +122 -0
- llama_cloud/resources/embedding_model_configs/client.py +82 -22
- llama_cloud/resources/files/client.py +18 -4
- llama_cloud/resources/llama_extract/__init__.py +21 -0
- llama_cloud/resources/llama_extract/client.py +227 -114
- llama_cloud/resources/llama_extract/types/__init__.py +21 -0
- llama_cloud/resources/parsing/client.py +123 -4
- llama_cloud/resources/pipelines/client.py +116 -11
- llama_cloud/types/__init__.py +172 -52
- llama_cloud/types/{extract_schema_validate_request.py → audio_block.py} +5 -3
- llama_cloud/types/batch.py +47 -0
- llama_cloud/types/batch_item.py +40 -0
- llama_cloud/types/batch_paginated_list.py +35 -0
- llama_cloud/types/{base_prompt_template.py → batch_public_output.py} +7 -7
- llama_cloud/types/cloud_confluence_data_source.py +1 -0
- llama_cloud/types/cloud_jira_data_source.py +0 -4
- llama_cloud/types/cloud_postgres_vector_store.py +2 -0
- llama_cloud/types/cloud_sharepoint_data_source.py +1 -0
- llama_cloud/types/data_sink_component.py +65 -7
- llama_cloud/types/data_sink_create_component.py +65 -7
- llama_cloud/types/data_source_component.py +2 -23
- llama_cloud/types/data_source_component_one.py +122 -0
- llama_cloud/types/data_source_create_component.py +2 -23
- llama_cloud/types/data_source_create_component_one.py +122 -0
- llama_cloud/types/{extract_agent_update.py → data_source_update_dispatcher_config.py} +6 -6
- llama_cloud/types/{node_parser.py → delete_params.py} +7 -9
- llama_cloud/types/{extract_agent_create.py → document_ingestion_job_params.py} +11 -7
- llama_cloud/types/extract_config.py +2 -0
- llama_cloud/types/extract_job_create.py +1 -2
- llama_cloud/types/fail_page_mode.py +29 -0
- llama_cloud/types/file_count_by_status_response.py +37 -0
- llama_cloud/types/file_parse_public.py +36 -0
- llama_cloud/types/job_names.py +8 -12
- llama_cloud/types/job_record.py +2 -2
- llama_cloud/types/job_record_parameters.py +111 -0
- llama_cloud/types/l_lama_parse_transform_config.py +37 -0
- llama_cloud/types/legacy_parse_job_config.py +189 -0
- llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py +13 -1
- llama_cloud/types/llama_parse_parameters.py +8 -0
- llama_cloud/types/load_files_job_config.py +35 -0
- llama_cloud/types/message_role.py +4 -0
- llama_cloud/types/parse_job_config.py +134 -0
- llama_cloud/types/pg_vector_distance_method.py +43 -0
- llama_cloud/types/{extract_job_create_batch.py → pg_vector_hnsw_settings.py} +12 -9
- llama_cloud/types/pg_vector_vector_type.py +35 -0
- llama_cloud/types/pipeline.py +2 -4
- llama_cloud/types/pipeline_create.py +3 -2
- llama_cloud/types/pipeline_data_source.py +3 -0
- llama_cloud/types/pipeline_data_source_component.py +2 -23
- llama_cloud/types/pipeline_data_source_component_one.py +122 -0
- llama_cloud/types/pipeline_data_source_status.py +33 -0
- llama_cloud/types/pipeline_file.py +1 -0
- llama_cloud/types/pipeline_file_update_dispatcher_config.py +38 -0
- llama_cloud/types/{markdown_node_parser.py → pipeline_file_updater_config.py} +14 -15
- llama_cloud/types/pipeline_managed_ingestion_job_params.py +37 -0
- llama_cloud/types/pipeline_metadata_config.py +36 -0
- llama_cloud/types/prompt_conf.py +3 -0
- llama_cloud/types/struct_parse_conf.py +4 -1
- {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/METADATA +4 -2
- {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/RECORD +82 -68
- {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/WHEEL +1 -1
- llama_cloud/types/character_splitter.py +0 -46
- llama_cloud/types/code_splitter.py +0 -50
- llama_cloud/types/configured_transformation_item.py +0 -46
- llama_cloud/types/configured_transformation_item_component.py +0 -22
- llama_cloud/types/llm.py +0 -60
- llama_cloud/types/markdown_element_node_parser.py +0 -51
- llama_cloud/types/page_splitter_node_parser.py +0 -42
- llama_cloud/types/pydantic_program_mode.py +0 -41
- llama_cloud/types/sentence_splitter.py +0 -50
- llama_cloud/types/token_text_splitter.py +0 -47
- /llama_cloud/{types → resources/llama_extract/types}/extract_agent_create_data_schema.py +0 -0
- /llama_cloud/{types → resources/llama_extract/types}/extract_agent_create_data_schema_zero_value.py +0 -0
- /llama_cloud/{types → resources/llama_extract/types}/extract_agent_update_data_schema.py +0 -0
- /llama_cloud/{types → resources/llama_extract/types}/extract_agent_update_data_schema_zero_value.py +0 -0
- /llama_cloud/{types → resources/llama_extract/types}/extract_job_create_batch_data_schema_override.py +0 -0
- /llama_cloud/{types → resources/llama_extract/types}/extract_job_create_batch_data_schema_override_zero_value.py +0 -0
- /llama_cloud/{types → resources/llama_extract/types}/extract_schema_validate_request_data_schema.py +0 -0
- /llama_cloud/{types → resources/llama_extract/types}/extract_schema_validate_request_data_schema_zero_value.py +0 -0
- {llama_cloud-0.1.18.dist-info → llama_cloud-0.1.20.dist-info}/LICENSE +0 -0
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from .data_source_update_component import DataSourceUpdateComponent
|
|
4
|
+
from .data_source_update_component_one import (
|
|
5
|
+
DataSourceUpdateComponentOne,
|
|
6
|
+
DataSourceUpdateComponentOne_AzureStorageBlob,
|
|
7
|
+
DataSourceUpdateComponentOne_Box,
|
|
8
|
+
DataSourceUpdateComponentOne_Confluence,
|
|
9
|
+
DataSourceUpdateComponentOne_GoogleDrive,
|
|
10
|
+
DataSourceUpdateComponentOne_Jira,
|
|
11
|
+
DataSourceUpdateComponentOne_MicrosoftOnedrive,
|
|
12
|
+
DataSourceUpdateComponentOne_MicrosoftSharepoint,
|
|
13
|
+
DataSourceUpdateComponentOne_NotionPage,
|
|
14
|
+
DataSourceUpdateComponentOne_S3,
|
|
15
|
+
DataSourceUpdateComponentOne_Slack,
|
|
16
|
+
)
|
|
4
17
|
from .data_source_update_custom_metadata_value import DataSourceUpdateCustomMetadataValue
|
|
5
18
|
|
|
6
|
-
__all__ = [
|
|
19
|
+
__all__ = [
|
|
20
|
+
"DataSourceUpdateComponent",
|
|
21
|
+
"DataSourceUpdateComponentOne",
|
|
22
|
+
"DataSourceUpdateComponentOne_AzureStorageBlob",
|
|
23
|
+
"DataSourceUpdateComponentOne_Box",
|
|
24
|
+
"DataSourceUpdateComponentOne_Confluence",
|
|
25
|
+
"DataSourceUpdateComponentOne_GoogleDrive",
|
|
26
|
+
"DataSourceUpdateComponentOne_Jira",
|
|
27
|
+
"DataSourceUpdateComponentOne_MicrosoftOnedrive",
|
|
28
|
+
"DataSourceUpdateComponentOne_MicrosoftSharepoint",
|
|
29
|
+
"DataSourceUpdateComponentOne_NotionPage",
|
|
30
|
+
"DataSourceUpdateComponentOne_S3",
|
|
31
|
+
"DataSourceUpdateComponentOne_Slack",
|
|
32
|
+
"DataSourceUpdateCustomMetadataValue",
|
|
33
|
+
]
|
|
@@ -2,27 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from ....types.cloud_box_data_source import CloudBoxDataSource
|
|
7
|
-
from ....types.cloud_confluence_data_source import CloudConfluenceDataSource
|
|
8
|
-
from ....types.cloud_google_drive_data_source import CloudGoogleDriveDataSource
|
|
9
|
-
from ....types.cloud_jira_data_source import CloudJiraDataSource
|
|
10
|
-
from ....types.cloud_notion_page_data_source import CloudNotionPageDataSource
|
|
11
|
-
from ....types.cloud_one_drive_data_source import CloudOneDriveDataSource
|
|
12
|
-
from ....types.cloud_s_3_data_source import CloudS3DataSource
|
|
13
|
-
from ....types.cloud_sharepoint_data_source import CloudSharepointDataSource
|
|
14
|
-
from ....types.cloud_slack_data_source import CloudSlackDataSource
|
|
5
|
+
from .data_source_update_component_one import DataSourceUpdateComponentOne
|
|
15
6
|
|
|
16
|
-
DataSourceUpdateComponent = typing.Union[
|
|
17
|
-
typing.Dict[str, typing.Any],
|
|
18
|
-
CloudS3DataSource,
|
|
19
|
-
CloudAzStorageBlobDataSource,
|
|
20
|
-
CloudGoogleDriveDataSource,
|
|
21
|
-
CloudOneDriveDataSource,
|
|
22
|
-
CloudSharepointDataSource,
|
|
23
|
-
CloudSlackDataSource,
|
|
24
|
-
CloudNotionPageDataSource,
|
|
25
|
-
CloudConfluenceDataSource,
|
|
26
|
-
CloudJiraDataSource,
|
|
27
|
-
CloudBoxDataSource,
|
|
28
|
-
]
|
|
7
|
+
DataSourceUpdateComponent = typing.Union[typing.Dict[str, typing.Any], DataSourceUpdateComponentOne]
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
]
|
|
@@ -30,24 +30,26 @@ class EmbeddingModelConfigsClient:
|
|
|
30
30
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
31
31
|
self._client_wrapper = client_wrapper
|
|
32
32
|
|
|
33
|
-
def list_embedding_model_configs(
|
|
33
|
+
def list_embedding_model_configs(
|
|
34
|
+
self, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
35
|
+
) -> typing.List[EmbeddingModelConfig]:
|
|
34
36
|
"""
|
|
35
37
|
Parameters:
|
|
36
|
-
- project_id: str.
|
|
38
|
+
- project_id: typing.Optional[str].
|
|
39
|
+
|
|
40
|
+
- organization_id: typing.Optional[str].
|
|
37
41
|
---
|
|
38
42
|
from llama_cloud.client import LlamaCloud
|
|
39
43
|
|
|
40
44
|
client = LlamaCloud(
|
|
41
45
|
token="YOUR_TOKEN",
|
|
42
46
|
)
|
|
43
|
-
client.embedding_model_configs.list_embedding_model_configs(
|
|
44
|
-
project_id="string",
|
|
45
|
-
)
|
|
47
|
+
client.embedding_model_configs.list_embedding_model_configs()
|
|
46
48
|
"""
|
|
47
49
|
_response = self._client_wrapper.httpx_client.request(
|
|
48
50
|
"GET",
|
|
49
51
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/embedding-model-configs"),
|
|
50
|
-
params=remove_none_from_dict({"project_id": project_id}),
|
|
52
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
51
53
|
headers=self._client_wrapper.get_headers(),
|
|
52
54
|
timeout=60,
|
|
53
55
|
)
|
|
@@ -62,13 +64,20 @@ class EmbeddingModelConfigsClient:
|
|
|
62
64
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
63
65
|
|
|
64
66
|
def create_embedding_model_config(
|
|
65
|
-
self,
|
|
67
|
+
self,
|
|
68
|
+
*,
|
|
69
|
+
project_id: typing.Optional[str] = None,
|
|
70
|
+
organization_id: typing.Optional[str] = None,
|
|
71
|
+
name: str,
|
|
72
|
+
embedding_config: EmbeddingModelConfigCreateEmbeddingConfig,
|
|
66
73
|
) -> EmbeddingModelConfig:
|
|
67
74
|
"""
|
|
68
75
|
Create a new embedding model configuration within a specified project.
|
|
69
76
|
|
|
70
77
|
Parameters:
|
|
71
|
-
- project_id: str.
|
|
78
|
+
- project_id: typing.Optional[str].
|
|
79
|
+
|
|
80
|
+
- organization_id: typing.Optional[str].
|
|
72
81
|
|
|
73
82
|
- name: str. The name of the embedding model config.
|
|
74
83
|
|
|
@@ -77,7 +86,7 @@ class EmbeddingModelConfigsClient:
|
|
|
77
86
|
_response = self._client_wrapper.httpx_client.request(
|
|
78
87
|
"POST",
|
|
79
88
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/embedding-model-configs"),
|
|
80
|
-
params=remove_none_from_dict({"project_id": project_id}),
|
|
89
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
81
90
|
json=jsonable_encoder({"name": name, "embedding_config": embedding_config}),
|
|
82
91
|
headers=self._client_wrapper.get_headers(),
|
|
83
92
|
timeout=60,
|
|
@@ -129,7 +138,12 @@ class EmbeddingModelConfigsClient:
|
|
|
129
138
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
130
139
|
|
|
131
140
|
def update_embedding_model_config(
|
|
132
|
-
self,
|
|
141
|
+
self,
|
|
142
|
+
embedding_model_config_id: str,
|
|
143
|
+
*,
|
|
144
|
+
project_id: typing.Optional[str] = None,
|
|
145
|
+
organization_id: typing.Optional[str] = None,
|
|
146
|
+
request: EmbeddingModelConfigUpdate,
|
|
133
147
|
) -> EmbeddingModelConfig:
|
|
134
148
|
"""
|
|
135
149
|
Update an embedding model config by ID.
|
|
@@ -137,6 +151,10 @@ class EmbeddingModelConfigsClient:
|
|
|
137
151
|
Parameters:
|
|
138
152
|
- embedding_model_config_id: str.
|
|
139
153
|
|
|
154
|
+
- project_id: typing.Optional[str].
|
|
155
|
+
|
|
156
|
+
- organization_id: typing.Optional[str].
|
|
157
|
+
|
|
140
158
|
- request: EmbeddingModelConfigUpdate.
|
|
141
159
|
"""
|
|
142
160
|
_response = self._client_wrapper.httpx_client.request(
|
|
@@ -144,6 +162,7 @@ class EmbeddingModelConfigsClient:
|
|
|
144
162
|
urllib.parse.urljoin(
|
|
145
163
|
f"{self._client_wrapper.get_base_url()}/", f"api/v1/embedding-model-configs/{embedding_model_config_id}"
|
|
146
164
|
),
|
|
165
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
147
166
|
json=jsonable_encoder(request),
|
|
148
167
|
headers=self._client_wrapper.get_headers(),
|
|
149
168
|
timeout=60,
|
|
@@ -158,12 +177,22 @@ class EmbeddingModelConfigsClient:
|
|
|
158
177
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
159
178
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
160
179
|
|
|
161
|
-
def delete_embedding_model_config(
|
|
180
|
+
def delete_embedding_model_config(
|
|
181
|
+
self,
|
|
182
|
+
embedding_model_config_id: str,
|
|
183
|
+
*,
|
|
184
|
+
project_id: typing.Optional[str] = None,
|
|
185
|
+
organization_id: typing.Optional[str] = None,
|
|
186
|
+
) -> None:
|
|
162
187
|
"""
|
|
163
188
|
Delete an embedding model config by ID.
|
|
164
189
|
|
|
165
190
|
Parameters:
|
|
166
191
|
- embedding_model_config_id: str.
|
|
192
|
+
|
|
193
|
+
- project_id: typing.Optional[str].
|
|
194
|
+
|
|
195
|
+
- organization_id: typing.Optional[str].
|
|
167
196
|
---
|
|
168
197
|
from llama_cloud.client import LlamaCloud
|
|
169
198
|
|
|
@@ -179,6 +208,7 @@ class EmbeddingModelConfigsClient:
|
|
|
179
208
|
urllib.parse.urljoin(
|
|
180
209
|
f"{self._client_wrapper.get_base_url()}/", f"api/v1/embedding-model-configs/{embedding_model_config_id}"
|
|
181
210
|
),
|
|
211
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
182
212
|
headers=self._client_wrapper.get_headers(),
|
|
183
213
|
timeout=60,
|
|
184
214
|
)
|
|
@@ -197,24 +227,26 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
197
227
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
198
228
|
self._client_wrapper = client_wrapper
|
|
199
229
|
|
|
200
|
-
async def list_embedding_model_configs(
|
|
230
|
+
async def list_embedding_model_configs(
|
|
231
|
+
self, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
232
|
+
) -> typing.List[EmbeddingModelConfig]:
|
|
201
233
|
"""
|
|
202
234
|
Parameters:
|
|
203
|
-
- project_id: str.
|
|
235
|
+
- project_id: typing.Optional[str].
|
|
236
|
+
|
|
237
|
+
- organization_id: typing.Optional[str].
|
|
204
238
|
---
|
|
205
239
|
from llama_cloud.client import AsyncLlamaCloud
|
|
206
240
|
|
|
207
241
|
client = AsyncLlamaCloud(
|
|
208
242
|
token="YOUR_TOKEN",
|
|
209
243
|
)
|
|
210
|
-
await client.embedding_model_configs.list_embedding_model_configs(
|
|
211
|
-
project_id="string",
|
|
212
|
-
)
|
|
244
|
+
await client.embedding_model_configs.list_embedding_model_configs()
|
|
213
245
|
"""
|
|
214
246
|
_response = await self._client_wrapper.httpx_client.request(
|
|
215
247
|
"GET",
|
|
216
248
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/embedding-model-configs"),
|
|
217
|
-
params=remove_none_from_dict({"project_id": project_id}),
|
|
249
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
218
250
|
headers=self._client_wrapper.get_headers(),
|
|
219
251
|
timeout=60,
|
|
220
252
|
)
|
|
@@ -229,13 +261,20 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
229
261
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
230
262
|
|
|
231
263
|
async def create_embedding_model_config(
|
|
232
|
-
self,
|
|
264
|
+
self,
|
|
265
|
+
*,
|
|
266
|
+
project_id: typing.Optional[str] = None,
|
|
267
|
+
organization_id: typing.Optional[str] = None,
|
|
268
|
+
name: str,
|
|
269
|
+
embedding_config: EmbeddingModelConfigCreateEmbeddingConfig,
|
|
233
270
|
) -> EmbeddingModelConfig:
|
|
234
271
|
"""
|
|
235
272
|
Create a new embedding model configuration within a specified project.
|
|
236
273
|
|
|
237
274
|
Parameters:
|
|
238
|
-
- project_id: str.
|
|
275
|
+
- project_id: typing.Optional[str].
|
|
276
|
+
|
|
277
|
+
- organization_id: typing.Optional[str].
|
|
239
278
|
|
|
240
279
|
- name: str. The name of the embedding model config.
|
|
241
280
|
|
|
@@ -244,7 +283,7 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
244
283
|
_response = await self._client_wrapper.httpx_client.request(
|
|
245
284
|
"POST",
|
|
246
285
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/embedding-model-configs"),
|
|
247
|
-
params=remove_none_from_dict({"project_id": project_id}),
|
|
286
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
248
287
|
json=jsonable_encoder({"name": name, "embedding_config": embedding_config}),
|
|
249
288
|
headers=self._client_wrapper.get_headers(),
|
|
250
289
|
timeout=60,
|
|
@@ -296,7 +335,12 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
296
335
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
297
336
|
|
|
298
337
|
async def update_embedding_model_config(
|
|
299
|
-
self,
|
|
338
|
+
self,
|
|
339
|
+
embedding_model_config_id: str,
|
|
340
|
+
*,
|
|
341
|
+
project_id: typing.Optional[str] = None,
|
|
342
|
+
organization_id: typing.Optional[str] = None,
|
|
343
|
+
request: EmbeddingModelConfigUpdate,
|
|
300
344
|
) -> EmbeddingModelConfig:
|
|
301
345
|
"""
|
|
302
346
|
Update an embedding model config by ID.
|
|
@@ -304,6 +348,10 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
304
348
|
Parameters:
|
|
305
349
|
- embedding_model_config_id: str.
|
|
306
350
|
|
|
351
|
+
- project_id: typing.Optional[str].
|
|
352
|
+
|
|
353
|
+
- organization_id: typing.Optional[str].
|
|
354
|
+
|
|
307
355
|
- request: EmbeddingModelConfigUpdate.
|
|
308
356
|
"""
|
|
309
357
|
_response = await self._client_wrapper.httpx_client.request(
|
|
@@ -311,6 +359,7 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
311
359
|
urllib.parse.urljoin(
|
|
312
360
|
f"{self._client_wrapper.get_base_url()}/", f"api/v1/embedding-model-configs/{embedding_model_config_id}"
|
|
313
361
|
),
|
|
362
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
314
363
|
json=jsonable_encoder(request),
|
|
315
364
|
headers=self._client_wrapper.get_headers(),
|
|
316
365
|
timeout=60,
|
|
@@ -325,12 +374,22 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
325
374
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
326
375
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
327
376
|
|
|
328
|
-
async def delete_embedding_model_config(
|
|
377
|
+
async def delete_embedding_model_config(
|
|
378
|
+
self,
|
|
379
|
+
embedding_model_config_id: str,
|
|
380
|
+
*,
|
|
381
|
+
project_id: typing.Optional[str] = None,
|
|
382
|
+
organization_id: typing.Optional[str] = None,
|
|
383
|
+
) -> None:
|
|
329
384
|
"""
|
|
330
385
|
Delete an embedding model config by ID.
|
|
331
386
|
|
|
332
387
|
Parameters:
|
|
333
388
|
- embedding_model_config_id: str.
|
|
389
|
+
|
|
390
|
+
- project_id: typing.Optional[str].
|
|
391
|
+
|
|
392
|
+
- organization_id: typing.Optional[str].
|
|
334
393
|
---
|
|
335
394
|
from llama_cloud.client import AsyncLlamaCloud
|
|
336
395
|
|
|
@@ -346,6 +405,7 @@ class AsyncEmbeddingModelConfigsClient:
|
|
|
346
405
|
urllib.parse.urljoin(
|
|
347
406
|
f"{self._client_wrapper.get_base_url()}/", f"api/v1/embedding-model-configs/{embedding_model_config_id}"
|
|
348
407
|
),
|
|
408
|
+
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
349
409
|
headers=self._client_wrapper.get_headers(),
|
|
350
410
|
timeout=60,
|
|
351
411
|
)
|
|
@@ -213,7 +213,7 @@ class FilesClient:
|
|
|
213
213
|
|
|
214
214
|
- organization_id: typing.Optional[str].
|
|
215
215
|
|
|
216
|
-
- name: str.
|
|
216
|
+
- name: str. Name that will be used for created file. If possible, always include the file extension in the name.
|
|
217
217
|
|
|
218
218
|
- external_file_id: typing.Optional[str].
|
|
219
219
|
|
|
@@ -318,7 +318,14 @@ class FilesClient:
|
|
|
318
318
|
resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateFromUrlResourceInfoValue]]] = OMIT,
|
|
319
319
|
) -> File:
|
|
320
320
|
"""
|
|
321
|
-
Upload a file to
|
|
321
|
+
Upload a file to the project from a URL.
|
|
322
|
+
|
|
323
|
+
If name is ommitted in the request payload, the file name will be
|
|
324
|
+
extracted from the response Content-Disposition header if available
|
|
325
|
+
or otherwise it will be derived from the URL path.
|
|
326
|
+
|
|
327
|
+
If providing the name in the request payload, always suffix the
|
|
328
|
+
file extension in the name if available.
|
|
322
329
|
|
|
323
330
|
Parameters:
|
|
324
331
|
- project_id: typing.Optional[str].
|
|
@@ -833,7 +840,7 @@ class AsyncFilesClient:
|
|
|
833
840
|
|
|
834
841
|
- organization_id: typing.Optional[str].
|
|
835
842
|
|
|
836
|
-
- name: str.
|
|
843
|
+
- name: str. Name that will be used for created file. If possible, always include the file extension in the name.
|
|
837
844
|
|
|
838
845
|
- external_file_id: typing.Optional[str].
|
|
839
846
|
|
|
@@ -938,7 +945,14 @@ class AsyncFilesClient:
|
|
|
938
945
|
resource_info: typing.Optional[typing.Dict[str, typing.Optional[FileCreateFromUrlResourceInfoValue]]] = OMIT,
|
|
939
946
|
) -> File:
|
|
940
947
|
"""
|
|
941
|
-
Upload a file to
|
|
948
|
+
Upload a file to the project from a URL.
|
|
949
|
+
|
|
950
|
+
If name is ommitted in the request payload, the file name will be
|
|
951
|
+
extracted from the response Content-Disposition header if available
|
|
952
|
+
or otherwise it will be derived from the URL path.
|
|
953
|
+
|
|
954
|
+
If providing the name in the request payload, always suffix the
|
|
955
|
+
file extension in the name if available.
|
|
942
956
|
|
|
943
957
|
Parameters:
|
|
944
958
|
- project_id: typing.Optional[str].
|
|
@@ -1,2 +1,23 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from .types import (
|
|
4
|
+
ExtractAgentCreateDataSchema,
|
|
5
|
+
ExtractAgentCreateDataSchemaZeroValue,
|
|
6
|
+
ExtractAgentUpdateDataSchema,
|
|
7
|
+
ExtractAgentUpdateDataSchemaZeroValue,
|
|
8
|
+
ExtractJobCreateBatchDataSchemaOverride,
|
|
9
|
+
ExtractJobCreateBatchDataSchemaOverrideZeroValue,
|
|
10
|
+
ExtractSchemaValidateRequestDataSchema,
|
|
11
|
+
ExtractSchemaValidateRequestDataSchemaZeroValue,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"ExtractAgentCreateDataSchema",
|
|
16
|
+
"ExtractAgentCreateDataSchemaZeroValue",
|
|
17
|
+
"ExtractAgentUpdateDataSchema",
|
|
18
|
+
"ExtractAgentUpdateDataSchemaZeroValue",
|
|
19
|
+
"ExtractJobCreateBatchDataSchemaOverride",
|
|
20
|
+
"ExtractJobCreateBatchDataSchemaOverrideZeroValue",
|
|
21
|
+
"ExtractSchemaValidateRequestDataSchema",
|
|
22
|
+
"ExtractSchemaValidateRequestDataSchemaZeroValue",
|
|
23
|
+
]
|