hotdata 0.0.1__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.
- hotdata/__init__.py +300 -0
- hotdata/api/__init__.py +20 -0
- hotdata/api/connection_types_api.py +549 -0
- hotdata/api/connections_api.py +2213 -0
- hotdata/api/datasets_api.py +1711 -0
- hotdata/api/embedding_providers_api.py +1380 -0
- hotdata/api/indexes_api.py +977 -0
- hotdata/api/information_schema_api.py +390 -0
- hotdata/api/jobs_api.py +619 -0
- hotdata/api/query_api.py +320 -0
- hotdata/api/query_runs_api.py +615 -0
- hotdata/api/refresh_api.py +317 -0
- hotdata/api/results_api.py +581 -0
- hotdata/api/saved_queries_api.py +2003 -0
- hotdata/api/secrets_api.py +1380 -0
- hotdata/api/uploads_api.py +595 -0
- hotdata/api/workspace_context_api.py +828 -0
- hotdata/api/workspaces_api.py +602 -0
- hotdata/api_client.py +806 -0
- hotdata/api_response.py +21 -0
- hotdata/configuration.py +620 -0
- hotdata/exceptions.py +219 -0
- hotdata/models/__init__.py +125 -0
- hotdata/models/api_error_detail.py +90 -0
- hotdata/models/api_error_response.py +92 -0
- hotdata/models/async_query_response.py +99 -0
- hotdata/models/boolean_profile_detail.py +91 -0
- hotdata/models/categorical_profile_detail.py +96 -0
- hotdata/models/category_value_info.py +96 -0
- hotdata/models/column_definition.py +140 -0
- hotdata/models/column_info.py +92 -0
- hotdata/models/column_profile_detail.py +180 -0
- hotdata/models/column_profile_detail_one_of.py +105 -0
- hotdata/models/column_profile_detail_one_of1.py +102 -0
- hotdata/models/column_profile_detail_one_of2.py +101 -0
- hotdata/models/column_profile_detail_one_of3.py +99 -0
- hotdata/models/column_profile_detail_one_of4.py +100 -0
- hotdata/models/column_profile_info.py +108 -0
- hotdata/models/column_type_spec.py +117 -0
- hotdata/models/connection_health_response.py +100 -0
- hotdata/models/connection_info.py +92 -0
- hotdata/models/connection_refresh_result.py +117 -0
- hotdata/models/connection_schema_error.py +90 -0
- hotdata/models/connection_type_detail.py +104 -0
- hotdata/models/connection_type_summary.py +90 -0
- hotdata/models/create_connection_request.py +108 -0
- hotdata/models/create_connection_response.py +105 -0
- hotdata/models/create_dataset_request.py +101 -0
- hotdata/models/create_dataset_response.py +99 -0
- hotdata/models/create_embedding_provider_request.py +111 -0
- hotdata/models/create_embedding_provider_response.py +102 -0
- hotdata/models/create_index_request.py +130 -0
- hotdata/models/create_saved_query_request.py +104 -0
- hotdata/models/create_secret_request.py +90 -0
- hotdata/models/create_secret_response.py +93 -0
- hotdata/models/create_workspace201_response.py +93 -0
- hotdata/models/create_workspace_request.py +90 -0
- hotdata/models/create_workspace_response.py +94 -0
- hotdata/models/dataset_source.py +180 -0
- hotdata/models/dataset_source_one_of.py +109 -0
- hotdata/models/dataset_source_one_of1.py +91 -0
- hotdata/models/dataset_summary.py +108 -0
- hotdata/models/dataset_version_summary.py +95 -0
- hotdata/models/discovery_status.py +39 -0
- hotdata/models/embedding_provider_response.py +108 -0
- hotdata/models/error.py +88 -0
- hotdata/models/execute_saved_query_request.py +93 -0
- hotdata/models/get_connection_response.py +97 -0
- hotdata/models/get_dataset_response.py +120 -0
- hotdata/models/get_result_response.py +126 -0
- hotdata/models/get_secret_response.py +93 -0
- hotdata/models/get_workspace_context_response.py +92 -0
- hotdata/models/index_info_response.py +107 -0
- hotdata/models/index_status.py +38 -0
- hotdata/models/information_schema_response.py +110 -0
- hotdata/models/inline_data.py +92 -0
- hotdata/models/inline_dataset_source.py +92 -0
- hotdata/models/job_result.py +152 -0
- hotdata/models/job_status.py +41 -0
- hotdata/models/job_status_response.py +124 -0
- hotdata/models/job_type.py +40 -0
- hotdata/models/list_connection_types_response.py +96 -0
- hotdata/models/list_connections_response.py +96 -0
- hotdata/models/list_dataset_versions_response.py +107 -0
- hotdata/models/list_datasets_response.py +105 -0
- hotdata/models/list_embedding_providers_response.py +96 -0
- hotdata/models/list_indexes_response.py +96 -0
- hotdata/models/list_jobs_response.py +96 -0
- hotdata/models/list_query_runs_response.py +110 -0
- hotdata/models/list_results_response.py +105 -0
- hotdata/models/list_saved_queries_response.py +105 -0
- hotdata/models/list_saved_query_versions_response.py +107 -0
- hotdata/models/list_secrets_response.py +96 -0
- hotdata/models/list_uploads_response.py +96 -0
- hotdata/models/list_workspace_contexts_response.py +96 -0
- hotdata/models/list_workspaces200_response.py +97 -0
- hotdata/models/list_workspaces_response.py +98 -0
- hotdata/models/numeric_profile_detail.py +92 -0
- hotdata/models/query_request.py +98 -0
- hotdata/models/query_response.py +113 -0
- hotdata/models/query_run_info.py +176 -0
- hotdata/models/refresh_dataset_response.py +95 -0
- hotdata/models/refresh_request.py +120 -0
- hotdata/models/refresh_response.py +180 -0
- hotdata/models/refresh_warning.py +102 -0
- hotdata/models/result_info.py +100 -0
- hotdata/models/saved_query_dataset_source.py +95 -0
- hotdata/models/saved_query_detail.py +168 -0
- hotdata/models/saved_query_summary.py +101 -0
- hotdata/models/saved_query_version_info.py +158 -0
- hotdata/models/schema_refresh_result.py +107 -0
- hotdata/models/secret_metadata_response.py +93 -0
- hotdata/models/sql_query_dataset_source.py +102 -0
- hotdata/models/submit_job_response.py +93 -0
- hotdata/models/table_info.py +116 -0
- hotdata/models/table_profile_response.py +112 -0
- hotdata/models/table_refresh_error.py +92 -0
- hotdata/models/table_refresh_result.py +107 -0
- hotdata/models/temporal_profile_detail.py +90 -0
- hotdata/models/text_profile_detail.py +93 -0
- hotdata/models/update_dataset_request.py +107 -0
- hotdata/models/update_dataset_response.py +104 -0
- hotdata/models/update_embedding_provider_request.py +114 -0
- hotdata/models/update_embedding_provider_response.py +93 -0
- hotdata/models/update_saved_query_request.py +128 -0
- hotdata/models/update_secret_request.py +88 -0
- hotdata/models/update_secret_response.py +91 -0
- hotdata/models/upload_dataset_source.py +97 -0
- hotdata/models/upload_info.py +102 -0
- hotdata/models/upload_response.py +102 -0
- hotdata/models/upsert_workspace_context_request.py +90 -0
- hotdata/models/upsert_workspace_context_response.py +92 -0
- hotdata/models/url_dataset_source.py +97 -0
- hotdata/models/workspace_context_entry.py +93 -0
- hotdata/models/workspace_detail.py +94 -0
- hotdata/models/workspace_list_item.py +98 -0
- hotdata/py.typed +0 -0
- hotdata/rest.py +264 -0
- hotdata-0.0.1.dist-info/METADATA +93 -0
- hotdata-0.0.1.dist-info/RECORD +142 -0
- hotdata-0.0.1.dist-info/WHEEL +5 -0
- hotdata-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1380 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Hotdata API
|
|
3
|
+
|
|
4
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: developers@hotdata.dev
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from hotdata.models.create_embedding_provider_request import CreateEmbeddingProviderRequest
|
|
22
|
+
from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse
|
|
23
|
+
from hotdata.models.embedding_provider_response import EmbeddingProviderResponse
|
|
24
|
+
from hotdata.models.list_embedding_providers_response import ListEmbeddingProvidersResponse
|
|
25
|
+
from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest
|
|
26
|
+
from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse
|
|
27
|
+
|
|
28
|
+
from hotdata.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from hotdata.api_response import ApiResponse
|
|
30
|
+
from hotdata.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class EmbeddingProvidersApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
def create_embedding_provider(
|
|
48
|
+
self,
|
|
49
|
+
create_embedding_provider_request: CreateEmbeddingProviderRequest,
|
|
50
|
+
_request_timeout: Union[
|
|
51
|
+
None,
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Tuple[
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
56
|
+
]
|
|
57
|
+
] = None,
|
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
+
) -> CreateEmbeddingProviderResponse:
|
|
63
|
+
"""Create embedding provider
|
|
64
|
+
|
|
65
|
+
Register a new embedding provider that can be used to generate vector embeddings for text columns. Providers can be service-based (e.g., OpenAI) or local.
|
|
66
|
+
|
|
67
|
+
:param create_embedding_provider_request: (required)
|
|
68
|
+
:type create_embedding_provider_request: CreateEmbeddingProviderRequest
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._create_embedding_provider_serialize(
|
|
92
|
+
create_embedding_provider_request=create_embedding_provider_request,
|
|
93
|
+
_request_auth=_request_auth,
|
|
94
|
+
_content_type=_content_type,
|
|
95
|
+
_headers=_headers,
|
|
96
|
+
_host_index=_host_index
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
100
|
+
'201': "CreateEmbeddingProviderResponse",
|
|
101
|
+
'400': "ApiErrorResponse",
|
|
102
|
+
'409': "ApiErrorResponse",
|
|
103
|
+
}
|
|
104
|
+
response_data = self.api_client.call_api(
|
|
105
|
+
*_param,
|
|
106
|
+
_request_timeout=_request_timeout
|
|
107
|
+
)
|
|
108
|
+
response_data.read()
|
|
109
|
+
return self.api_client.response_deserialize(
|
|
110
|
+
response_data=response_data,
|
|
111
|
+
response_types_map=_response_types_map,
|
|
112
|
+
).data
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@validate_call
|
|
116
|
+
def create_embedding_provider_with_http_info(
|
|
117
|
+
self,
|
|
118
|
+
create_embedding_provider_request: CreateEmbeddingProviderRequest,
|
|
119
|
+
_request_timeout: Union[
|
|
120
|
+
None,
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Tuple[
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
125
|
+
]
|
|
126
|
+
] = None,
|
|
127
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_content_type: Optional[StrictStr] = None,
|
|
129
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
131
|
+
) -> ApiResponse[CreateEmbeddingProviderResponse]:
|
|
132
|
+
"""Create embedding provider
|
|
133
|
+
|
|
134
|
+
Register a new embedding provider that can be used to generate vector embeddings for text columns. Providers can be service-based (e.g., OpenAI) or local.
|
|
135
|
+
|
|
136
|
+
:param create_embedding_provider_request: (required)
|
|
137
|
+
:type create_embedding_provider_request: CreateEmbeddingProviderRequest
|
|
138
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
139
|
+
number provided, it will be total request
|
|
140
|
+
timeout. It can also be a pair (tuple) of
|
|
141
|
+
(connection, read) timeouts.
|
|
142
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
143
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
144
|
+
request; this effectively ignores the
|
|
145
|
+
authentication in the spec for a single request.
|
|
146
|
+
:type _request_auth: dict, optional
|
|
147
|
+
:param _content_type: force content-type for the request.
|
|
148
|
+
:type _content_type: str, Optional
|
|
149
|
+
:param _headers: set to override the headers for a single
|
|
150
|
+
request; this effectively ignores the headers
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _headers: dict, optional
|
|
153
|
+
:param _host_index: set to override the host_index for a single
|
|
154
|
+
request; this effectively ignores the host_index
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _host_index: int, optional
|
|
157
|
+
:return: Returns the result object.
|
|
158
|
+
""" # noqa: E501
|
|
159
|
+
|
|
160
|
+
_param = self._create_embedding_provider_serialize(
|
|
161
|
+
create_embedding_provider_request=create_embedding_provider_request,
|
|
162
|
+
_request_auth=_request_auth,
|
|
163
|
+
_content_type=_content_type,
|
|
164
|
+
_headers=_headers,
|
|
165
|
+
_host_index=_host_index
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
169
|
+
'201': "CreateEmbeddingProviderResponse",
|
|
170
|
+
'400': "ApiErrorResponse",
|
|
171
|
+
'409': "ApiErrorResponse",
|
|
172
|
+
}
|
|
173
|
+
response_data = self.api_client.call_api(
|
|
174
|
+
*_param,
|
|
175
|
+
_request_timeout=_request_timeout
|
|
176
|
+
)
|
|
177
|
+
response_data.read()
|
|
178
|
+
return self.api_client.response_deserialize(
|
|
179
|
+
response_data=response_data,
|
|
180
|
+
response_types_map=_response_types_map,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@validate_call
|
|
185
|
+
def create_embedding_provider_without_preload_content(
|
|
186
|
+
self,
|
|
187
|
+
create_embedding_provider_request: CreateEmbeddingProviderRequest,
|
|
188
|
+
_request_timeout: Union[
|
|
189
|
+
None,
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Tuple[
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
194
|
+
]
|
|
195
|
+
] = None,
|
|
196
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_content_type: Optional[StrictStr] = None,
|
|
198
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
200
|
+
) -> RESTResponseType:
|
|
201
|
+
"""Create embedding provider
|
|
202
|
+
|
|
203
|
+
Register a new embedding provider that can be used to generate vector embeddings for text columns. Providers can be service-based (e.g., OpenAI) or local.
|
|
204
|
+
|
|
205
|
+
:param create_embedding_provider_request: (required)
|
|
206
|
+
:type create_embedding_provider_request: CreateEmbeddingProviderRequest
|
|
207
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
208
|
+
number provided, it will be total request
|
|
209
|
+
timeout. It can also be a pair (tuple) of
|
|
210
|
+
(connection, read) timeouts.
|
|
211
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
212
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
213
|
+
request; this effectively ignores the
|
|
214
|
+
authentication in the spec for a single request.
|
|
215
|
+
:type _request_auth: dict, optional
|
|
216
|
+
:param _content_type: force content-type for the request.
|
|
217
|
+
:type _content_type: str, Optional
|
|
218
|
+
:param _headers: set to override the headers for a single
|
|
219
|
+
request; this effectively ignores the headers
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _headers: dict, optional
|
|
222
|
+
:param _host_index: set to override the host_index for a single
|
|
223
|
+
request; this effectively ignores the host_index
|
|
224
|
+
in the spec for a single request.
|
|
225
|
+
:type _host_index: int, optional
|
|
226
|
+
:return: Returns the result object.
|
|
227
|
+
""" # noqa: E501
|
|
228
|
+
|
|
229
|
+
_param = self._create_embedding_provider_serialize(
|
|
230
|
+
create_embedding_provider_request=create_embedding_provider_request,
|
|
231
|
+
_request_auth=_request_auth,
|
|
232
|
+
_content_type=_content_type,
|
|
233
|
+
_headers=_headers,
|
|
234
|
+
_host_index=_host_index
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
238
|
+
'201': "CreateEmbeddingProviderResponse",
|
|
239
|
+
'400': "ApiErrorResponse",
|
|
240
|
+
'409': "ApiErrorResponse",
|
|
241
|
+
}
|
|
242
|
+
response_data = self.api_client.call_api(
|
|
243
|
+
*_param,
|
|
244
|
+
_request_timeout=_request_timeout
|
|
245
|
+
)
|
|
246
|
+
return response_data.response
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def _create_embedding_provider_serialize(
|
|
250
|
+
self,
|
|
251
|
+
create_embedding_provider_request,
|
|
252
|
+
_request_auth,
|
|
253
|
+
_content_type,
|
|
254
|
+
_headers,
|
|
255
|
+
_host_index,
|
|
256
|
+
) -> RequestSerialized:
|
|
257
|
+
|
|
258
|
+
_host = None
|
|
259
|
+
|
|
260
|
+
_collection_formats: Dict[str, str] = {
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
_path_params: Dict[str, str] = {}
|
|
264
|
+
_query_params: List[Tuple[str, str]] = []
|
|
265
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
266
|
+
_form_params: List[Tuple[str, str]] = []
|
|
267
|
+
_files: Dict[
|
|
268
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
269
|
+
] = {}
|
|
270
|
+
_body_params: Optional[bytes] = None
|
|
271
|
+
|
|
272
|
+
# process the path parameters
|
|
273
|
+
# process the query parameters
|
|
274
|
+
# process the header parameters
|
|
275
|
+
# process the form parameters
|
|
276
|
+
# process the body parameter
|
|
277
|
+
if create_embedding_provider_request is not None:
|
|
278
|
+
_body_params = create_embedding_provider_request
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
# set the HTTP header `Accept`
|
|
282
|
+
if 'Accept' not in _header_params:
|
|
283
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
284
|
+
[
|
|
285
|
+
'application/json'
|
|
286
|
+
]
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
# set the HTTP header `Content-Type`
|
|
290
|
+
if _content_type:
|
|
291
|
+
_header_params['Content-Type'] = _content_type
|
|
292
|
+
else:
|
|
293
|
+
_default_content_type = (
|
|
294
|
+
self.api_client.select_header_content_type(
|
|
295
|
+
[
|
|
296
|
+
'application/json'
|
|
297
|
+
]
|
|
298
|
+
)
|
|
299
|
+
)
|
|
300
|
+
if _default_content_type is not None:
|
|
301
|
+
_header_params['Content-Type'] = _default_content_type
|
|
302
|
+
|
|
303
|
+
# authentication setting
|
|
304
|
+
_auth_settings: List[str] = [
|
|
305
|
+
'BearerAuth'
|
|
306
|
+
]
|
|
307
|
+
|
|
308
|
+
return self.api_client.param_serialize(
|
|
309
|
+
method='POST',
|
|
310
|
+
resource_path='/v1/embedding-providers',
|
|
311
|
+
path_params=_path_params,
|
|
312
|
+
query_params=_query_params,
|
|
313
|
+
header_params=_header_params,
|
|
314
|
+
body=_body_params,
|
|
315
|
+
post_params=_form_params,
|
|
316
|
+
files=_files,
|
|
317
|
+
auth_settings=_auth_settings,
|
|
318
|
+
collection_formats=_collection_formats,
|
|
319
|
+
_host=_host,
|
|
320
|
+
_request_auth=_request_auth
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
@validate_call
|
|
327
|
+
def delete_embedding_provider(
|
|
328
|
+
self,
|
|
329
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
330
|
+
_request_timeout: Union[
|
|
331
|
+
None,
|
|
332
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
333
|
+
Tuple[
|
|
334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
336
|
+
]
|
|
337
|
+
] = None,
|
|
338
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
339
|
+
_content_type: Optional[StrictStr] = None,
|
|
340
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
341
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
342
|
+
) -> None:
|
|
343
|
+
"""Delete embedding provider
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
:param id: Embedding provider ID (required)
|
|
347
|
+
:type id: str
|
|
348
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
349
|
+
number provided, it will be total request
|
|
350
|
+
timeout. It can also be a pair (tuple) of
|
|
351
|
+
(connection, read) timeouts.
|
|
352
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
353
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
354
|
+
request; this effectively ignores the
|
|
355
|
+
authentication in the spec for a single request.
|
|
356
|
+
:type _request_auth: dict, optional
|
|
357
|
+
:param _content_type: force content-type for the request.
|
|
358
|
+
:type _content_type: str, Optional
|
|
359
|
+
:param _headers: set to override the headers for a single
|
|
360
|
+
request; this effectively ignores the headers
|
|
361
|
+
in the spec for a single request.
|
|
362
|
+
:type _headers: dict, optional
|
|
363
|
+
:param _host_index: set to override the host_index for a single
|
|
364
|
+
request; this effectively ignores the host_index
|
|
365
|
+
in the spec for a single request.
|
|
366
|
+
:type _host_index: int, optional
|
|
367
|
+
:return: Returns the result object.
|
|
368
|
+
""" # noqa: E501
|
|
369
|
+
|
|
370
|
+
_param = self._delete_embedding_provider_serialize(
|
|
371
|
+
id=id,
|
|
372
|
+
_request_auth=_request_auth,
|
|
373
|
+
_content_type=_content_type,
|
|
374
|
+
_headers=_headers,
|
|
375
|
+
_host_index=_host_index
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
379
|
+
'204': None,
|
|
380
|
+
'404': "ApiErrorResponse",
|
|
381
|
+
}
|
|
382
|
+
response_data = self.api_client.call_api(
|
|
383
|
+
*_param,
|
|
384
|
+
_request_timeout=_request_timeout
|
|
385
|
+
)
|
|
386
|
+
response_data.read()
|
|
387
|
+
return self.api_client.response_deserialize(
|
|
388
|
+
response_data=response_data,
|
|
389
|
+
response_types_map=_response_types_map,
|
|
390
|
+
).data
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
@validate_call
|
|
394
|
+
def delete_embedding_provider_with_http_info(
|
|
395
|
+
self,
|
|
396
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
397
|
+
_request_timeout: Union[
|
|
398
|
+
None,
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
400
|
+
Tuple[
|
|
401
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
402
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
403
|
+
]
|
|
404
|
+
] = None,
|
|
405
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
406
|
+
_content_type: Optional[StrictStr] = None,
|
|
407
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
408
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
409
|
+
) -> ApiResponse[None]:
|
|
410
|
+
"""Delete embedding provider
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
:param id: Embedding provider ID (required)
|
|
414
|
+
:type id: str
|
|
415
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
416
|
+
number provided, it will be total request
|
|
417
|
+
timeout. It can also be a pair (tuple) of
|
|
418
|
+
(connection, read) timeouts.
|
|
419
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
420
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
421
|
+
request; this effectively ignores the
|
|
422
|
+
authentication in the spec for a single request.
|
|
423
|
+
:type _request_auth: dict, optional
|
|
424
|
+
:param _content_type: force content-type for the request.
|
|
425
|
+
:type _content_type: str, Optional
|
|
426
|
+
:param _headers: set to override the headers for a single
|
|
427
|
+
request; this effectively ignores the headers
|
|
428
|
+
in the spec for a single request.
|
|
429
|
+
:type _headers: dict, optional
|
|
430
|
+
:param _host_index: set to override the host_index for a single
|
|
431
|
+
request; this effectively ignores the host_index
|
|
432
|
+
in the spec for a single request.
|
|
433
|
+
:type _host_index: int, optional
|
|
434
|
+
:return: Returns the result object.
|
|
435
|
+
""" # noqa: E501
|
|
436
|
+
|
|
437
|
+
_param = self._delete_embedding_provider_serialize(
|
|
438
|
+
id=id,
|
|
439
|
+
_request_auth=_request_auth,
|
|
440
|
+
_content_type=_content_type,
|
|
441
|
+
_headers=_headers,
|
|
442
|
+
_host_index=_host_index
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
446
|
+
'204': None,
|
|
447
|
+
'404': "ApiErrorResponse",
|
|
448
|
+
}
|
|
449
|
+
response_data = self.api_client.call_api(
|
|
450
|
+
*_param,
|
|
451
|
+
_request_timeout=_request_timeout
|
|
452
|
+
)
|
|
453
|
+
response_data.read()
|
|
454
|
+
return self.api_client.response_deserialize(
|
|
455
|
+
response_data=response_data,
|
|
456
|
+
response_types_map=_response_types_map,
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
@validate_call
|
|
461
|
+
def delete_embedding_provider_without_preload_content(
|
|
462
|
+
self,
|
|
463
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
464
|
+
_request_timeout: Union[
|
|
465
|
+
None,
|
|
466
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
467
|
+
Tuple[
|
|
468
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
470
|
+
]
|
|
471
|
+
] = None,
|
|
472
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
473
|
+
_content_type: Optional[StrictStr] = None,
|
|
474
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
475
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
476
|
+
) -> RESTResponseType:
|
|
477
|
+
"""Delete embedding provider
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
:param id: Embedding provider ID (required)
|
|
481
|
+
:type id: str
|
|
482
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
483
|
+
number provided, it will be total request
|
|
484
|
+
timeout. It can also be a pair (tuple) of
|
|
485
|
+
(connection, read) timeouts.
|
|
486
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
487
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
488
|
+
request; this effectively ignores the
|
|
489
|
+
authentication in the spec for a single request.
|
|
490
|
+
:type _request_auth: dict, optional
|
|
491
|
+
:param _content_type: force content-type for the request.
|
|
492
|
+
:type _content_type: str, Optional
|
|
493
|
+
:param _headers: set to override the headers for a single
|
|
494
|
+
request; this effectively ignores the headers
|
|
495
|
+
in the spec for a single request.
|
|
496
|
+
:type _headers: dict, optional
|
|
497
|
+
:param _host_index: set to override the host_index for a single
|
|
498
|
+
request; this effectively ignores the host_index
|
|
499
|
+
in the spec for a single request.
|
|
500
|
+
:type _host_index: int, optional
|
|
501
|
+
:return: Returns the result object.
|
|
502
|
+
""" # noqa: E501
|
|
503
|
+
|
|
504
|
+
_param = self._delete_embedding_provider_serialize(
|
|
505
|
+
id=id,
|
|
506
|
+
_request_auth=_request_auth,
|
|
507
|
+
_content_type=_content_type,
|
|
508
|
+
_headers=_headers,
|
|
509
|
+
_host_index=_host_index
|
|
510
|
+
)
|
|
511
|
+
|
|
512
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
513
|
+
'204': None,
|
|
514
|
+
'404': "ApiErrorResponse",
|
|
515
|
+
}
|
|
516
|
+
response_data = self.api_client.call_api(
|
|
517
|
+
*_param,
|
|
518
|
+
_request_timeout=_request_timeout
|
|
519
|
+
)
|
|
520
|
+
return response_data.response
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
def _delete_embedding_provider_serialize(
|
|
524
|
+
self,
|
|
525
|
+
id,
|
|
526
|
+
_request_auth,
|
|
527
|
+
_content_type,
|
|
528
|
+
_headers,
|
|
529
|
+
_host_index,
|
|
530
|
+
) -> RequestSerialized:
|
|
531
|
+
|
|
532
|
+
_host = None
|
|
533
|
+
|
|
534
|
+
_collection_formats: Dict[str, str] = {
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
_path_params: Dict[str, str] = {}
|
|
538
|
+
_query_params: List[Tuple[str, str]] = []
|
|
539
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
540
|
+
_form_params: List[Tuple[str, str]] = []
|
|
541
|
+
_files: Dict[
|
|
542
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
543
|
+
] = {}
|
|
544
|
+
_body_params: Optional[bytes] = None
|
|
545
|
+
|
|
546
|
+
# process the path parameters
|
|
547
|
+
if id is not None:
|
|
548
|
+
_path_params['id'] = id
|
|
549
|
+
# process the query parameters
|
|
550
|
+
# process the header parameters
|
|
551
|
+
# process the form parameters
|
|
552
|
+
# process the body parameter
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
# set the HTTP header `Accept`
|
|
556
|
+
if 'Accept' not in _header_params:
|
|
557
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
558
|
+
[
|
|
559
|
+
'application/json'
|
|
560
|
+
]
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
# authentication setting
|
|
565
|
+
_auth_settings: List[str] = [
|
|
566
|
+
'BearerAuth'
|
|
567
|
+
]
|
|
568
|
+
|
|
569
|
+
return self.api_client.param_serialize(
|
|
570
|
+
method='DELETE',
|
|
571
|
+
resource_path='/v1/embedding-providers/{id}',
|
|
572
|
+
path_params=_path_params,
|
|
573
|
+
query_params=_query_params,
|
|
574
|
+
header_params=_header_params,
|
|
575
|
+
body=_body_params,
|
|
576
|
+
post_params=_form_params,
|
|
577
|
+
files=_files,
|
|
578
|
+
auth_settings=_auth_settings,
|
|
579
|
+
collection_formats=_collection_formats,
|
|
580
|
+
_host=_host,
|
|
581
|
+
_request_auth=_request_auth
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
@validate_call
|
|
588
|
+
def get_embedding_provider(
|
|
589
|
+
self,
|
|
590
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
591
|
+
_request_timeout: Union[
|
|
592
|
+
None,
|
|
593
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
594
|
+
Tuple[
|
|
595
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
596
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
597
|
+
]
|
|
598
|
+
] = None,
|
|
599
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
600
|
+
_content_type: Optional[StrictStr] = None,
|
|
601
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
602
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
603
|
+
) -> EmbeddingProviderResponse:
|
|
604
|
+
"""Get embedding provider
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
:param id: Embedding provider ID (required)
|
|
608
|
+
:type id: str
|
|
609
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
610
|
+
number provided, it will be total request
|
|
611
|
+
timeout. It can also be a pair (tuple) of
|
|
612
|
+
(connection, read) timeouts.
|
|
613
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
614
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
615
|
+
request; this effectively ignores the
|
|
616
|
+
authentication in the spec for a single request.
|
|
617
|
+
:type _request_auth: dict, optional
|
|
618
|
+
:param _content_type: force content-type for the request.
|
|
619
|
+
:type _content_type: str, Optional
|
|
620
|
+
:param _headers: set to override the headers for a single
|
|
621
|
+
request; this effectively ignores the headers
|
|
622
|
+
in the spec for a single request.
|
|
623
|
+
:type _headers: dict, optional
|
|
624
|
+
:param _host_index: set to override the host_index for a single
|
|
625
|
+
request; this effectively ignores the host_index
|
|
626
|
+
in the spec for a single request.
|
|
627
|
+
:type _host_index: int, optional
|
|
628
|
+
:return: Returns the result object.
|
|
629
|
+
""" # noqa: E501
|
|
630
|
+
|
|
631
|
+
_param = self._get_embedding_provider_serialize(
|
|
632
|
+
id=id,
|
|
633
|
+
_request_auth=_request_auth,
|
|
634
|
+
_content_type=_content_type,
|
|
635
|
+
_headers=_headers,
|
|
636
|
+
_host_index=_host_index
|
|
637
|
+
)
|
|
638
|
+
|
|
639
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
640
|
+
'200': "EmbeddingProviderResponse",
|
|
641
|
+
'404': "ApiErrorResponse",
|
|
642
|
+
}
|
|
643
|
+
response_data = self.api_client.call_api(
|
|
644
|
+
*_param,
|
|
645
|
+
_request_timeout=_request_timeout
|
|
646
|
+
)
|
|
647
|
+
response_data.read()
|
|
648
|
+
return self.api_client.response_deserialize(
|
|
649
|
+
response_data=response_data,
|
|
650
|
+
response_types_map=_response_types_map,
|
|
651
|
+
).data
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
@validate_call
|
|
655
|
+
def get_embedding_provider_with_http_info(
|
|
656
|
+
self,
|
|
657
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
658
|
+
_request_timeout: Union[
|
|
659
|
+
None,
|
|
660
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
661
|
+
Tuple[
|
|
662
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
663
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
664
|
+
]
|
|
665
|
+
] = None,
|
|
666
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
667
|
+
_content_type: Optional[StrictStr] = None,
|
|
668
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
669
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
670
|
+
) -> ApiResponse[EmbeddingProviderResponse]:
|
|
671
|
+
"""Get embedding provider
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
:param id: Embedding provider ID (required)
|
|
675
|
+
:type id: str
|
|
676
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
677
|
+
number provided, it will be total request
|
|
678
|
+
timeout. It can also be a pair (tuple) of
|
|
679
|
+
(connection, read) timeouts.
|
|
680
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
681
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
682
|
+
request; this effectively ignores the
|
|
683
|
+
authentication in the spec for a single request.
|
|
684
|
+
:type _request_auth: dict, optional
|
|
685
|
+
:param _content_type: force content-type for the request.
|
|
686
|
+
:type _content_type: str, Optional
|
|
687
|
+
:param _headers: set to override the headers for a single
|
|
688
|
+
request; this effectively ignores the headers
|
|
689
|
+
in the spec for a single request.
|
|
690
|
+
:type _headers: dict, optional
|
|
691
|
+
:param _host_index: set to override the host_index for a single
|
|
692
|
+
request; this effectively ignores the host_index
|
|
693
|
+
in the spec for a single request.
|
|
694
|
+
:type _host_index: int, optional
|
|
695
|
+
:return: Returns the result object.
|
|
696
|
+
""" # noqa: E501
|
|
697
|
+
|
|
698
|
+
_param = self._get_embedding_provider_serialize(
|
|
699
|
+
id=id,
|
|
700
|
+
_request_auth=_request_auth,
|
|
701
|
+
_content_type=_content_type,
|
|
702
|
+
_headers=_headers,
|
|
703
|
+
_host_index=_host_index
|
|
704
|
+
)
|
|
705
|
+
|
|
706
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
707
|
+
'200': "EmbeddingProviderResponse",
|
|
708
|
+
'404': "ApiErrorResponse",
|
|
709
|
+
}
|
|
710
|
+
response_data = self.api_client.call_api(
|
|
711
|
+
*_param,
|
|
712
|
+
_request_timeout=_request_timeout
|
|
713
|
+
)
|
|
714
|
+
response_data.read()
|
|
715
|
+
return self.api_client.response_deserialize(
|
|
716
|
+
response_data=response_data,
|
|
717
|
+
response_types_map=_response_types_map,
|
|
718
|
+
)
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
@validate_call
|
|
722
|
+
def get_embedding_provider_without_preload_content(
|
|
723
|
+
self,
|
|
724
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
725
|
+
_request_timeout: Union[
|
|
726
|
+
None,
|
|
727
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
728
|
+
Tuple[
|
|
729
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
730
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
731
|
+
]
|
|
732
|
+
] = None,
|
|
733
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
734
|
+
_content_type: Optional[StrictStr] = None,
|
|
735
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
736
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
737
|
+
) -> RESTResponseType:
|
|
738
|
+
"""Get embedding provider
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
:param id: Embedding provider ID (required)
|
|
742
|
+
:type id: str
|
|
743
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
744
|
+
number provided, it will be total request
|
|
745
|
+
timeout. It can also be a pair (tuple) of
|
|
746
|
+
(connection, read) timeouts.
|
|
747
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
748
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
749
|
+
request; this effectively ignores the
|
|
750
|
+
authentication in the spec for a single request.
|
|
751
|
+
:type _request_auth: dict, optional
|
|
752
|
+
:param _content_type: force content-type for the request.
|
|
753
|
+
:type _content_type: str, Optional
|
|
754
|
+
:param _headers: set to override the headers for a single
|
|
755
|
+
request; this effectively ignores the headers
|
|
756
|
+
in the spec for a single request.
|
|
757
|
+
:type _headers: dict, optional
|
|
758
|
+
:param _host_index: set to override the host_index for a single
|
|
759
|
+
request; this effectively ignores the host_index
|
|
760
|
+
in the spec for a single request.
|
|
761
|
+
:type _host_index: int, optional
|
|
762
|
+
:return: Returns the result object.
|
|
763
|
+
""" # noqa: E501
|
|
764
|
+
|
|
765
|
+
_param = self._get_embedding_provider_serialize(
|
|
766
|
+
id=id,
|
|
767
|
+
_request_auth=_request_auth,
|
|
768
|
+
_content_type=_content_type,
|
|
769
|
+
_headers=_headers,
|
|
770
|
+
_host_index=_host_index
|
|
771
|
+
)
|
|
772
|
+
|
|
773
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
774
|
+
'200': "EmbeddingProviderResponse",
|
|
775
|
+
'404': "ApiErrorResponse",
|
|
776
|
+
}
|
|
777
|
+
response_data = self.api_client.call_api(
|
|
778
|
+
*_param,
|
|
779
|
+
_request_timeout=_request_timeout
|
|
780
|
+
)
|
|
781
|
+
return response_data.response
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
def _get_embedding_provider_serialize(
|
|
785
|
+
self,
|
|
786
|
+
id,
|
|
787
|
+
_request_auth,
|
|
788
|
+
_content_type,
|
|
789
|
+
_headers,
|
|
790
|
+
_host_index,
|
|
791
|
+
) -> RequestSerialized:
|
|
792
|
+
|
|
793
|
+
_host = None
|
|
794
|
+
|
|
795
|
+
_collection_formats: Dict[str, str] = {
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
_path_params: Dict[str, str] = {}
|
|
799
|
+
_query_params: List[Tuple[str, str]] = []
|
|
800
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
801
|
+
_form_params: List[Tuple[str, str]] = []
|
|
802
|
+
_files: Dict[
|
|
803
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
804
|
+
] = {}
|
|
805
|
+
_body_params: Optional[bytes] = None
|
|
806
|
+
|
|
807
|
+
# process the path parameters
|
|
808
|
+
if id is not None:
|
|
809
|
+
_path_params['id'] = id
|
|
810
|
+
# process the query parameters
|
|
811
|
+
# process the header parameters
|
|
812
|
+
# process the form parameters
|
|
813
|
+
# process the body parameter
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
# set the HTTP header `Accept`
|
|
817
|
+
if 'Accept' not in _header_params:
|
|
818
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
819
|
+
[
|
|
820
|
+
'application/json'
|
|
821
|
+
]
|
|
822
|
+
)
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
# authentication setting
|
|
826
|
+
_auth_settings: List[str] = [
|
|
827
|
+
'BearerAuth'
|
|
828
|
+
]
|
|
829
|
+
|
|
830
|
+
return self.api_client.param_serialize(
|
|
831
|
+
method='GET',
|
|
832
|
+
resource_path='/v1/embedding-providers/{id}',
|
|
833
|
+
path_params=_path_params,
|
|
834
|
+
query_params=_query_params,
|
|
835
|
+
header_params=_header_params,
|
|
836
|
+
body=_body_params,
|
|
837
|
+
post_params=_form_params,
|
|
838
|
+
files=_files,
|
|
839
|
+
auth_settings=_auth_settings,
|
|
840
|
+
collection_formats=_collection_formats,
|
|
841
|
+
_host=_host,
|
|
842
|
+
_request_auth=_request_auth
|
|
843
|
+
)
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
@validate_call
|
|
849
|
+
def list_embedding_providers(
|
|
850
|
+
self,
|
|
851
|
+
_request_timeout: Union[
|
|
852
|
+
None,
|
|
853
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
854
|
+
Tuple[
|
|
855
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
856
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
857
|
+
]
|
|
858
|
+
] = None,
|
|
859
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
860
|
+
_content_type: Optional[StrictStr] = None,
|
|
861
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
862
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
863
|
+
) -> ListEmbeddingProvidersResponse:
|
|
864
|
+
"""List embedding providers
|
|
865
|
+
|
|
866
|
+
List all registered embedding providers.
|
|
867
|
+
|
|
868
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
869
|
+
number provided, it will be total request
|
|
870
|
+
timeout. It can also be a pair (tuple) of
|
|
871
|
+
(connection, read) timeouts.
|
|
872
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
873
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
874
|
+
request; this effectively ignores the
|
|
875
|
+
authentication in the spec for a single request.
|
|
876
|
+
:type _request_auth: dict, optional
|
|
877
|
+
:param _content_type: force content-type for the request.
|
|
878
|
+
:type _content_type: str, Optional
|
|
879
|
+
:param _headers: set to override the headers for a single
|
|
880
|
+
request; this effectively ignores the headers
|
|
881
|
+
in the spec for a single request.
|
|
882
|
+
:type _headers: dict, optional
|
|
883
|
+
:param _host_index: set to override the host_index for a single
|
|
884
|
+
request; this effectively ignores the host_index
|
|
885
|
+
in the spec for a single request.
|
|
886
|
+
:type _host_index: int, optional
|
|
887
|
+
:return: Returns the result object.
|
|
888
|
+
""" # noqa: E501
|
|
889
|
+
|
|
890
|
+
_param = self._list_embedding_providers_serialize(
|
|
891
|
+
_request_auth=_request_auth,
|
|
892
|
+
_content_type=_content_type,
|
|
893
|
+
_headers=_headers,
|
|
894
|
+
_host_index=_host_index
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
898
|
+
'200': "ListEmbeddingProvidersResponse",
|
|
899
|
+
}
|
|
900
|
+
response_data = self.api_client.call_api(
|
|
901
|
+
*_param,
|
|
902
|
+
_request_timeout=_request_timeout
|
|
903
|
+
)
|
|
904
|
+
response_data.read()
|
|
905
|
+
return self.api_client.response_deserialize(
|
|
906
|
+
response_data=response_data,
|
|
907
|
+
response_types_map=_response_types_map,
|
|
908
|
+
).data
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
@validate_call
|
|
912
|
+
def list_embedding_providers_with_http_info(
|
|
913
|
+
self,
|
|
914
|
+
_request_timeout: Union[
|
|
915
|
+
None,
|
|
916
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
917
|
+
Tuple[
|
|
918
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
919
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
920
|
+
]
|
|
921
|
+
] = None,
|
|
922
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
923
|
+
_content_type: Optional[StrictStr] = None,
|
|
924
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
925
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
926
|
+
) -> ApiResponse[ListEmbeddingProvidersResponse]:
|
|
927
|
+
"""List embedding providers
|
|
928
|
+
|
|
929
|
+
List all registered embedding providers.
|
|
930
|
+
|
|
931
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
932
|
+
number provided, it will be total request
|
|
933
|
+
timeout. It can also be a pair (tuple) of
|
|
934
|
+
(connection, read) timeouts.
|
|
935
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
936
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
937
|
+
request; this effectively ignores the
|
|
938
|
+
authentication in the spec for a single request.
|
|
939
|
+
:type _request_auth: dict, optional
|
|
940
|
+
:param _content_type: force content-type for the request.
|
|
941
|
+
:type _content_type: str, Optional
|
|
942
|
+
:param _headers: set to override the headers for a single
|
|
943
|
+
request; this effectively ignores the headers
|
|
944
|
+
in the spec for a single request.
|
|
945
|
+
:type _headers: dict, optional
|
|
946
|
+
:param _host_index: set to override the host_index for a single
|
|
947
|
+
request; this effectively ignores the host_index
|
|
948
|
+
in the spec for a single request.
|
|
949
|
+
:type _host_index: int, optional
|
|
950
|
+
:return: Returns the result object.
|
|
951
|
+
""" # noqa: E501
|
|
952
|
+
|
|
953
|
+
_param = self._list_embedding_providers_serialize(
|
|
954
|
+
_request_auth=_request_auth,
|
|
955
|
+
_content_type=_content_type,
|
|
956
|
+
_headers=_headers,
|
|
957
|
+
_host_index=_host_index
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
961
|
+
'200': "ListEmbeddingProvidersResponse",
|
|
962
|
+
}
|
|
963
|
+
response_data = self.api_client.call_api(
|
|
964
|
+
*_param,
|
|
965
|
+
_request_timeout=_request_timeout
|
|
966
|
+
)
|
|
967
|
+
response_data.read()
|
|
968
|
+
return self.api_client.response_deserialize(
|
|
969
|
+
response_data=response_data,
|
|
970
|
+
response_types_map=_response_types_map,
|
|
971
|
+
)
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
@validate_call
|
|
975
|
+
def list_embedding_providers_without_preload_content(
|
|
976
|
+
self,
|
|
977
|
+
_request_timeout: Union[
|
|
978
|
+
None,
|
|
979
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
980
|
+
Tuple[
|
|
981
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
982
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
983
|
+
]
|
|
984
|
+
] = None,
|
|
985
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
986
|
+
_content_type: Optional[StrictStr] = None,
|
|
987
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
988
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
989
|
+
) -> RESTResponseType:
|
|
990
|
+
"""List embedding providers
|
|
991
|
+
|
|
992
|
+
List all registered embedding providers.
|
|
993
|
+
|
|
994
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
995
|
+
number provided, it will be total request
|
|
996
|
+
timeout. It can also be a pair (tuple) of
|
|
997
|
+
(connection, read) timeouts.
|
|
998
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
999
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1000
|
+
request; this effectively ignores the
|
|
1001
|
+
authentication in the spec for a single request.
|
|
1002
|
+
:type _request_auth: dict, optional
|
|
1003
|
+
:param _content_type: force content-type for the request.
|
|
1004
|
+
:type _content_type: str, Optional
|
|
1005
|
+
:param _headers: set to override the headers for a single
|
|
1006
|
+
request; this effectively ignores the headers
|
|
1007
|
+
in the spec for a single request.
|
|
1008
|
+
:type _headers: dict, optional
|
|
1009
|
+
:param _host_index: set to override the host_index for a single
|
|
1010
|
+
request; this effectively ignores the host_index
|
|
1011
|
+
in the spec for a single request.
|
|
1012
|
+
:type _host_index: int, optional
|
|
1013
|
+
:return: Returns the result object.
|
|
1014
|
+
""" # noqa: E501
|
|
1015
|
+
|
|
1016
|
+
_param = self._list_embedding_providers_serialize(
|
|
1017
|
+
_request_auth=_request_auth,
|
|
1018
|
+
_content_type=_content_type,
|
|
1019
|
+
_headers=_headers,
|
|
1020
|
+
_host_index=_host_index
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1024
|
+
'200': "ListEmbeddingProvidersResponse",
|
|
1025
|
+
}
|
|
1026
|
+
response_data = self.api_client.call_api(
|
|
1027
|
+
*_param,
|
|
1028
|
+
_request_timeout=_request_timeout
|
|
1029
|
+
)
|
|
1030
|
+
return response_data.response
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
def _list_embedding_providers_serialize(
|
|
1034
|
+
self,
|
|
1035
|
+
_request_auth,
|
|
1036
|
+
_content_type,
|
|
1037
|
+
_headers,
|
|
1038
|
+
_host_index,
|
|
1039
|
+
) -> RequestSerialized:
|
|
1040
|
+
|
|
1041
|
+
_host = None
|
|
1042
|
+
|
|
1043
|
+
_collection_formats: Dict[str, str] = {
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
_path_params: Dict[str, str] = {}
|
|
1047
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1048
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1049
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1050
|
+
_files: Dict[
|
|
1051
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1052
|
+
] = {}
|
|
1053
|
+
_body_params: Optional[bytes] = None
|
|
1054
|
+
|
|
1055
|
+
# process the path parameters
|
|
1056
|
+
# process the query parameters
|
|
1057
|
+
# process the header parameters
|
|
1058
|
+
# process the form parameters
|
|
1059
|
+
# process the body parameter
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
# set the HTTP header `Accept`
|
|
1063
|
+
if 'Accept' not in _header_params:
|
|
1064
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1065
|
+
[
|
|
1066
|
+
'application/json'
|
|
1067
|
+
]
|
|
1068
|
+
)
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
# authentication setting
|
|
1072
|
+
_auth_settings: List[str] = [
|
|
1073
|
+
'BearerAuth'
|
|
1074
|
+
]
|
|
1075
|
+
|
|
1076
|
+
return self.api_client.param_serialize(
|
|
1077
|
+
method='GET',
|
|
1078
|
+
resource_path='/v1/embedding-providers',
|
|
1079
|
+
path_params=_path_params,
|
|
1080
|
+
query_params=_query_params,
|
|
1081
|
+
header_params=_header_params,
|
|
1082
|
+
body=_body_params,
|
|
1083
|
+
post_params=_form_params,
|
|
1084
|
+
files=_files,
|
|
1085
|
+
auth_settings=_auth_settings,
|
|
1086
|
+
collection_formats=_collection_formats,
|
|
1087
|
+
_host=_host,
|
|
1088
|
+
_request_auth=_request_auth
|
|
1089
|
+
)
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
@validate_call
|
|
1095
|
+
def update_embedding_provider(
|
|
1096
|
+
self,
|
|
1097
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
1098
|
+
update_embedding_provider_request: UpdateEmbeddingProviderRequest,
|
|
1099
|
+
_request_timeout: Union[
|
|
1100
|
+
None,
|
|
1101
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1102
|
+
Tuple[
|
|
1103
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1104
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1105
|
+
]
|
|
1106
|
+
] = None,
|
|
1107
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1108
|
+
_content_type: Optional[StrictStr] = None,
|
|
1109
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1110
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1111
|
+
) -> UpdateEmbeddingProviderResponse:
|
|
1112
|
+
"""Update embedding provider
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
:param id: Embedding provider ID (required)
|
|
1116
|
+
:type id: str
|
|
1117
|
+
:param update_embedding_provider_request: (required)
|
|
1118
|
+
:type update_embedding_provider_request: UpdateEmbeddingProviderRequest
|
|
1119
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1120
|
+
number provided, it will be total request
|
|
1121
|
+
timeout. It can also be a pair (tuple) of
|
|
1122
|
+
(connection, read) timeouts.
|
|
1123
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1124
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1125
|
+
request; this effectively ignores the
|
|
1126
|
+
authentication in the spec for a single request.
|
|
1127
|
+
:type _request_auth: dict, optional
|
|
1128
|
+
:param _content_type: force content-type for the request.
|
|
1129
|
+
:type _content_type: str, Optional
|
|
1130
|
+
:param _headers: set to override the headers for a single
|
|
1131
|
+
request; this effectively ignores the headers
|
|
1132
|
+
in the spec for a single request.
|
|
1133
|
+
:type _headers: dict, optional
|
|
1134
|
+
:param _host_index: set to override the host_index for a single
|
|
1135
|
+
request; this effectively ignores the host_index
|
|
1136
|
+
in the spec for a single request.
|
|
1137
|
+
:type _host_index: int, optional
|
|
1138
|
+
:return: Returns the result object.
|
|
1139
|
+
""" # noqa: E501
|
|
1140
|
+
|
|
1141
|
+
_param = self._update_embedding_provider_serialize(
|
|
1142
|
+
id=id,
|
|
1143
|
+
update_embedding_provider_request=update_embedding_provider_request,
|
|
1144
|
+
_request_auth=_request_auth,
|
|
1145
|
+
_content_type=_content_type,
|
|
1146
|
+
_headers=_headers,
|
|
1147
|
+
_host_index=_host_index
|
|
1148
|
+
)
|
|
1149
|
+
|
|
1150
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1151
|
+
'200': "UpdateEmbeddingProviderResponse",
|
|
1152
|
+
'404': "ApiErrorResponse",
|
|
1153
|
+
}
|
|
1154
|
+
response_data = self.api_client.call_api(
|
|
1155
|
+
*_param,
|
|
1156
|
+
_request_timeout=_request_timeout
|
|
1157
|
+
)
|
|
1158
|
+
response_data.read()
|
|
1159
|
+
return self.api_client.response_deserialize(
|
|
1160
|
+
response_data=response_data,
|
|
1161
|
+
response_types_map=_response_types_map,
|
|
1162
|
+
).data
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
@validate_call
|
|
1166
|
+
def update_embedding_provider_with_http_info(
|
|
1167
|
+
self,
|
|
1168
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
1169
|
+
update_embedding_provider_request: UpdateEmbeddingProviderRequest,
|
|
1170
|
+
_request_timeout: Union[
|
|
1171
|
+
None,
|
|
1172
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1173
|
+
Tuple[
|
|
1174
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1175
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1176
|
+
]
|
|
1177
|
+
] = None,
|
|
1178
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1179
|
+
_content_type: Optional[StrictStr] = None,
|
|
1180
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1181
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1182
|
+
) -> ApiResponse[UpdateEmbeddingProviderResponse]:
|
|
1183
|
+
"""Update embedding provider
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
:param id: Embedding provider ID (required)
|
|
1187
|
+
:type id: str
|
|
1188
|
+
:param update_embedding_provider_request: (required)
|
|
1189
|
+
:type update_embedding_provider_request: UpdateEmbeddingProviderRequest
|
|
1190
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1191
|
+
number provided, it will be total request
|
|
1192
|
+
timeout. It can also be a pair (tuple) of
|
|
1193
|
+
(connection, read) timeouts.
|
|
1194
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1195
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1196
|
+
request; this effectively ignores the
|
|
1197
|
+
authentication in the spec for a single request.
|
|
1198
|
+
:type _request_auth: dict, optional
|
|
1199
|
+
:param _content_type: force content-type for the request.
|
|
1200
|
+
:type _content_type: str, Optional
|
|
1201
|
+
:param _headers: set to override the headers for a single
|
|
1202
|
+
request; this effectively ignores the headers
|
|
1203
|
+
in the spec for a single request.
|
|
1204
|
+
:type _headers: dict, optional
|
|
1205
|
+
:param _host_index: set to override the host_index for a single
|
|
1206
|
+
request; this effectively ignores the host_index
|
|
1207
|
+
in the spec for a single request.
|
|
1208
|
+
:type _host_index: int, optional
|
|
1209
|
+
:return: Returns the result object.
|
|
1210
|
+
""" # noqa: E501
|
|
1211
|
+
|
|
1212
|
+
_param = self._update_embedding_provider_serialize(
|
|
1213
|
+
id=id,
|
|
1214
|
+
update_embedding_provider_request=update_embedding_provider_request,
|
|
1215
|
+
_request_auth=_request_auth,
|
|
1216
|
+
_content_type=_content_type,
|
|
1217
|
+
_headers=_headers,
|
|
1218
|
+
_host_index=_host_index
|
|
1219
|
+
)
|
|
1220
|
+
|
|
1221
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1222
|
+
'200': "UpdateEmbeddingProviderResponse",
|
|
1223
|
+
'404': "ApiErrorResponse",
|
|
1224
|
+
}
|
|
1225
|
+
response_data = self.api_client.call_api(
|
|
1226
|
+
*_param,
|
|
1227
|
+
_request_timeout=_request_timeout
|
|
1228
|
+
)
|
|
1229
|
+
response_data.read()
|
|
1230
|
+
return self.api_client.response_deserialize(
|
|
1231
|
+
response_data=response_data,
|
|
1232
|
+
response_types_map=_response_types_map,
|
|
1233
|
+
)
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
@validate_call
|
|
1237
|
+
def update_embedding_provider_without_preload_content(
|
|
1238
|
+
self,
|
|
1239
|
+
id: Annotated[StrictStr, Field(description="Embedding provider ID")],
|
|
1240
|
+
update_embedding_provider_request: UpdateEmbeddingProviderRequest,
|
|
1241
|
+
_request_timeout: Union[
|
|
1242
|
+
None,
|
|
1243
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1244
|
+
Tuple[
|
|
1245
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1246
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1247
|
+
]
|
|
1248
|
+
] = None,
|
|
1249
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1250
|
+
_content_type: Optional[StrictStr] = None,
|
|
1251
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1252
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1253
|
+
) -> RESTResponseType:
|
|
1254
|
+
"""Update embedding provider
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
:param id: Embedding provider ID (required)
|
|
1258
|
+
:type id: str
|
|
1259
|
+
:param update_embedding_provider_request: (required)
|
|
1260
|
+
:type update_embedding_provider_request: UpdateEmbeddingProviderRequest
|
|
1261
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1262
|
+
number provided, it will be total request
|
|
1263
|
+
timeout. It can also be a pair (tuple) of
|
|
1264
|
+
(connection, read) timeouts.
|
|
1265
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1266
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1267
|
+
request; this effectively ignores the
|
|
1268
|
+
authentication in the spec for a single request.
|
|
1269
|
+
:type _request_auth: dict, optional
|
|
1270
|
+
:param _content_type: force content-type for the request.
|
|
1271
|
+
:type _content_type: str, Optional
|
|
1272
|
+
:param _headers: set to override the headers for a single
|
|
1273
|
+
request; this effectively ignores the headers
|
|
1274
|
+
in the spec for a single request.
|
|
1275
|
+
:type _headers: dict, optional
|
|
1276
|
+
:param _host_index: set to override the host_index for a single
|
|
1277
|
+
request; this effectively ignores the host_index
|
|
1278
|
+
in the spec for a single request.
|
|
1279
|
+
:type _host_index: int, optional
|
|
1280
|
+
:return: Returns the result object.
|
|
1281
|
+
""" # noqa: E501
|
|
1282
|
+
|
|
1283
|
+
_param = self._update_embedding_provider_serialize(
|
|
1284
|
+
id=id,
|
|
1285
|
+
update_embedding_provider_request=update_embedding_provider_request,
|
|
1286
|
+
_request_auth=_request_auth,
|
|
1287
|
+
_content_type=_content_type,
|
|
1288
|
+
_headers=_headers,
|
|
1289
|
+
_host_index=_host_index
|
|
1290
|
+
)
|
|
1291
|
+
|
|
1292
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1293
|
+
'200': "UpdateEmbeddingProviderResponse",
|
|
1294
|
+
'404': "ApiErrorResponse",
|
|
1295
|
+
}
|
|
1296
|
+
response_data = self.api_client.call_api(
|
|
1297
|
+
*_param,
|
|
1298
|
+
_request_timeout=_request_timeout
|
|
1299
|
+
)
|
|
1300
|
+
return response_data.response
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
def _update_embedding_provider_serialize(
|
|
1304
|
+
self,
|
|
1305
|
+
id,
|
|
1306
|
+
update_embedding_provider_request,
|
|
1307
|
+
_request_auth,
|
|
1308
|
+
_content_type,
|
|
1309
|
+
_headers,
|
|
1310
|
+
_host_index,
|
|
1311
|
+
) -> RequestSerialized:
|
|
1312
|
+
|
|
1313
|
+
_host = None
|
|
1314
|
+
|
|
1315
|
+
_collection_formats: Dict[str, str] = {
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
_path_params: Dict[str, str] = {}
|
|
1319
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1320
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1321
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1322
|
+
_files: Dict[
|
|
1323
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1324
|
+
] = {}
|
|
1325
|
+
_body_params: Optional[bytes] = None
|
|
1326
|
+
|
|
1327
|
+
# process the path parameters
|
|
1328
|
+
if id is not None:
|
|
1329
|
+
_path_params['id'] = id
|
|
1330
|
+
# process the query parameters
|
|
1331
|
+
# process the header parameters
|
|
1332
|
+
# process the form parameters
|
|
1333
|
+
# process the body parameter
|
|
1334
|
+
if update_embedding_provider_request is not None:
|
|
1335
|
+
_body_params = update_embedding_provider_request
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
# set the HTTP header `Accept`
|
|
1339
|
+
if 'Accept' not in _header_params:
|
|
1340
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1341
|
+
[
|
|
1342
|
+
'application/json'
|
|
1343
|
+
]
|
|
1344
|
+
)
|
|
1345
|
+
|
|
1346
|
+
# set the HTTP header `Content-Type`
|
|
1347
|
+
if _content_type:
|
|
1348
|
+
_header_params['Content-Type'] = _content_type
|
|
1349
|
+
else:
|
|
1350
|
+
_default_content_type = (
|
|
1351
|
+
self.api_client.select_header_content_type(
|
|
1352
|
+
[
|
|
1353
|
+
'application/json'
|
|
1354
|
+
]
|
|
1355
|
+
)
|
|
1356
|
+
)
|
|
1357
|
+
if _default_content_type is not None:
|
|
1358
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1359
|
+
|
|
1360
|
+
# authentication setting
|
|
1361
|
+
_auth_settings: List[str] = [
|
|
1362
|
+
'BearerAuth'
|
|
1363
|
+
]
|
|
1364
|
+
|
|
1365
|
+
return self.api_client.param_serialize(
|
|
1366
|
+
method='PUT',
|
|
1367
|
+
resource_path='/v1/embedding-providers/{id}',
|
|
1368
|
+
path_params=_path_params,
|
|
1369
|
+
query_params=_query_params,
|
|
1370
|
+
header_params=_header_params,
|
|
1371
|
+
body=_body_params,
|
|
1372
|
+
post_params=_form_params,
|
|
1373
|
+
files=_files,
|
|
1374
|
+
auth_settings=_auth_settings,
|
|
1375
|
+
collection_formats=_collection_formats,
|
|
1376
|
+
_host=_host,
|
|
1377
|
+
_request_auth=_request_auth
|
|
1378
|
+
)
|
|
1379
|
+
|
|
1380
|
+
|