qanswer_sdk 3.1213.0__py3-none-any.whl → 3.1245.0__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.
Files changed (140) hide show
  1. qanswer_sdk/__init__.py +66 -43
  2. qanswer_sdk/api/__init__.py +7 -4
  3. qanswer_sdk/api/admin_api.py +590 -7695
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +72 -73
  5. qanswer_sdk/api/ai_assistant_api.py +567 -46
  6. qanswer_sdk/api/branding_api.py +4578 -0
  7. qanswer_sdk/api/chatbot_api.py +72 -87
  8. qanswer_sdk/api/{tag_api.py → connector_imap_connector_api.py} +415 -997
  9. qanswer_sdk/api/connector_rdf_api.py +30 -31
  10. qanswer_sdk/api/connectors_api.py +183 -166
  11. qanswer_sdk/api/connectors_data_api.py +345 -1
  12. qanswer_sdk/api/dataset_config_api.py +0 -245
  13. qanswer_sdk/api/llm_api.py +30 -30
  14. qanswer_sdk/api/payment_api.py +17 -16
  15. qanswer_sdk/api/speech_to_text_api.py +2 -2
  16. qanswer_sdk/api/task_chat_api.py +8 -7
  17. qanswer_sdk/api/task_rdf_linker_api.py +35 -36
  18. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +16 -16
  19. qanswer_sdk/api/task_report_copilot_api.py +895 -281
  20. qanswer_sdk/api/task_search_api.py +8 -7
  21. qanswer_sdk/api/tool_embedder_api.py +4040 -0
  22. qanswer_sdk/api/{user_api.py → tool_llm_api.py} +735 -2749
  23. qanswer_sdk/api/unit_organizations_api.py +4547 -0
  24. qanswer_sdk/api/unit_teams_api.py +3906 -0
  25. qanswer_sdk/api/{organizations_teams_api.py → unit_user_api.py} +1345 -1394
  26. qanswer_sdk/api_client.py +1 -1
  27. qanswer_sdk/configuration.py +1 -1
  28. qanswer_sdk/models/__init__.py +58 -38
  29. qanswer_sdk/models/aggregation.py +2 -2
  30. qanswer_sdk/models/ai_assistant_filter_dto.py +105 -0
  31. qanswer_sdk/models/{user_profile_paginated.py → ai_assistant_list.py} +18 -18
  32. qanswer_sdk/models/{embedding_model.py → available_aggregation.py} +13 -11
  33. qanswer_sdk/models/available_connectors_response.py +2 -2
  34. qanswer_sdk/models/{branding_data.py → branding_app_title.py} +4 -4
  35. qanswer_sdk/models/{api_response.py → branding_system_message.py} +8 -8
  36. qanswer_sdk/models/chat_task_settings.py +12 -12
  37. qanswer_sdk/models/chat_task_update.py +13 -5
  38. qanswer_sdk/models/chatbot_chat_payload.py +19 -2
  39. qanswer_sdk/models/chatbot_conversation_model.py +10 -0
  40. qanswer_sdk/models/chatbot_response.py +22 -2
  41. qanswer_sdk/models/{user_chatbot_setting_payload.py → chatbot_setting_dto.py} +12 -13
  42. qanswer_sdk/models/chatbot_setting_request.py +96 -0
  43. qanswer_sdk/models/{question_completion.py → clip_connector_file_structure.py} +9 -9
  44. qanswer_sdk/models/clip_connector_structure.py +97 -0
  45. qanswer_sdk/models/connector_model.py +2 -2
  46. qanswer_sdk/models/conversation_message.py +4 -12
  47. qanswer_sdk/models/{cost_summary.py → cost_summary_dto.py} +4 -4
  48. qanswer_sdk/models/create_connector_request.py +4 -2
  49. qanswer_sdk/models/create_imap_connector_request.py +105 -0
  50. qanswer_sdk/models/create_pinecone_connector_request.py +3 -1
  51. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +3 -1
  52. qanswer_sdk/models/create_sharepoint_connector_request.py +3 -1
  53. qanswer_sdk/models/dataset_detail_kg.py +27 -1
  54. qanswer_sdk/models/dataset_schema.py +4 -2
  55. qanswer_sdk/models/dataset_update_object.py +3 -1
  56. qanswer_sdk/models/delete_connector_model.py +2 -2
  57. qanswer_sdk/models/delete_connectors_response.py +2 -4
  58. qanswer_sdk/models/{json_nullable_source_metadata.py → duplicate_report_template_response.py} +11 -9
  59. qanswer_sdk/models/{json_nullable_file_failure_reason.py → email_folder.py} +12 -8
  60. qanswer_sdk/models/{embedding_endpoint.py → embedder_detailed_dto.py} +16 -8
  61. qanswer_sdk/models/{tag_payload.py → embedder_dto.py} +11 -7
  62. qanswer_sdk/models/{pageable_object.py → embedder_list_dto.py} +20 -20
  63. qanswer_sdk/models/embedding_endpoint_create.py +3 -1
  64. qanswer_sdk/models/embedding_endpoint_update.py +4 -2
  65. qanswer_sdk/models/{sort_object.py → entity_description.py} +16 -12
  66. qanswer_sdk/models/{dataset_description.py → entity_description_dto.py} +9 -7
  67. qanswer_sdk/models/file_model.py +2 -2
  68. qanswer_sdk/models/imap_add_payload.py +103 -0
  69. qanswer_sdk/models/imap_additional_fields.py +101 -0
  70. qanswer_sdk/models/imap_file_metadata.py +114 -0
  71. qanswer_sdk/models/imap_search_response.py +113 -0
  72. qanswer_sdk/models/llm.py +129 -0
  73. qanswer_sdk/models/llm_consumption.py +118 -0
  74. qanswer_sdk/models/{pageable.py → llm_context_ranges.py} +14 -13
  75. qanswer_sdk/models/{llm_cost.py → llm_cost_filter.py} +11 -7
  76. qanswer_sdk/models/llm_cost_list.py +101 -0
  77. qanswer_sdk/models/llm_detailed_dto.py +179 -0
  78. qanswer_sdk/models/{llm_details.py → llm_dto.py} +14 -18
  79. qanswer_sdk/models/llm_endpoint.py +8 -2
  80. qanswer_sdk/models/llm_endpoint_read_input.py +173 -0
  81. qanswer_sdk/models/llm_endpoint_read_output.py +173 -0
  82. qanswer_sdk/models/llm_filter_dto.py +99 -0
  83. qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
  84. qanswer_sdk/models/llm_list_dto.py +101 -0
  85. qanswer_sdk/models/modify_connector_request.py +5 -11
  86. qanswer_sdk/models/{o_auth_service.py → o_auth_service_dto.py} +4 -4
  87. qanswer_sdk/models/organization_admin.py +95 -0
  88. qanswer_sdk/models/organization_filter_dto.py +97 -0
  89. qanswer_sdk/models/organization_list_dto.py +101 -0
  90. qanswer_sdk/models/organization_llm.py +103 -0
  91. qanswer_sdk/models/{plan.py → plan_dto.py} +4 -4
  92. qanswer_sdk/models/prompt_token_count_details.py +3 -3
  93. qanswer_sdk/models/rag_payload.py +4 -4
  94. qanswer_sdk/models/rag_response.py +4 -2
  95. qanswer_sdk/models/relation_extraction_task_settings.py +12 -10
  96. qanswer_sdk/models/relation_extraction_task_update.py +14 -4
  97. qanswer_sdk/models/report_copilot_slot_task_settings.py +12 -10
  98. qanswer_sdk/models/report_copilot_slot_task_update.py +13 -3
  99. qanswer_sdk/models/report_copilot_task_settings.py +12 -10
  100. qanswer_sdk/models/report_copilot_task_update.py +14 -4
  101. qanswer_sdk/models/{report_copilot_template.py → report_template.py} +17 -7
  102. qanswer_sdk/models/{report_copilot_create_payload.py → report_template_create_payload.py} +4 -4
  103. qanswer_sdk/models/{report_copilot_template_simplified.py → report_template_simplified.py} +11 -7
  104. qanswer_sdk/models/{report_copilot_export_template_as_docx_payload_simplified.py → report_template_simplified_payload.py} +4 -4
  105. qanswer_sdk/models/{report_copilot_update_payload.py → report_template_update_payload.py} +15 -9
  106. qanswer_sdk/models/search_task_settings.py +12 -12
  107. qanswer_sdk/models/search_task_update.py +13 -3
  108. qanswer_sdk/models/{set_logo1_request.py → set_logo2_request.py} +4 -4
  109. qanswer_sdk/models/shared_organization_access.py +7 -3
  110. qanswer_sdk/models/shared_team_access.py +10 -4
  111. qanswer_sdk/models/slot.py +5 -1
  112. qanswer_sdk/models/slot_update.py +5 -1
  113. qanswer_sdk/models/socket_conversation_message.py +3 -11
  114. qanswer_sdk/models/socket_file_metadata.py +17 -11
  115. qanswer_sdk/models/source_metadata.py +109 -0
  116. qanswer_sdk/models/{tag_qa_list_payload.py → subscription_response.py} +22 -21
  117. qanswer_sdk/models/{team_with_count.py → team_admin.py} +8 -8
  118. qanswer_sdk/models/{team_filter.py → team_filter_dto.py} +16 -6
  119. qanswer_sdk/models/team_list_dto.py +101 -0
  120. qanswer_sdk/models/{available_endpoints_response.py → template_clip_structure_input.py} +14 -14
  121. qanswer_sdk/models/{available_embedding_models_response.py → template_clip_structure_output.py} +14 -14
  122. qanswer_sdk/models/test_imap_connection_payload.py +95 -0
  123. qanswer_sdk/models/text2_sparql_payload.py +4 -4
  124. qanswer_sdk/models/text2_sparql_task_settings.py +12 -10
  125. qanswer_sdk/models/text2_sparql_task_update.py +14 -4
  126. qanswer_sdk/models/{user_chatbot_setting_response.py → user_chatbot_setting.py} +24 -24
  127. qanswer_sdk/models/user_dataset.py +38 -2
  128. qanswer_sdk/models/{qa_metadata_payload.py → user_dataset_shared.py} +27 -37
  129. qanswer_sdk/models/{user_filter.py → user_filter_dto.py} +4 -4
  130. qanswer_sdk/models/{user_profile.py → user_profile_dto.py} +10 -10
  131. qanswer_sdk/models/user_profile_list_dto.py +3 -3
  132. qanswer_sdk/models/widget_configs.py +4 -2
  133. {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/METADATA +2 -2
  134. {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/RECORD +135 -112
  135. qanswer_sdk/api/llm_consumption_controller_api.py +0 -310
  136. qanswer_sdk/models/organization_filter.py +0 -87
  137. qanswer_sdk/models/page_organization.py +0 -123
  138. qanswer_sdk/models/page_team_with_count.py +0 -123
  139. qanswer_sdk/models/tag_qa_payload.py +0 -91
  140. {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,4040 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 StrictBool, StrictBytes, StrictInt, StrictStr
20
+ from typing import List, Optional, Tuple, Union
21
+ from qanswer_sdk.models.embedder_detailed_dto import EmbedderDetailedDto
22
+ from qanswer_sdk.models.embedder_list_dto import EmbedderListDto
23
+ from qanswer_sdk.models.embedding_endpoint_create import EmbeddingEndpointCreate
24
+ from qanswer_sdk.models.embedding_endpoint_update import EmbeddingEndpointUpdate
25
+ from qanswer_sdk.models.embedding_endpoint_validation_response import EmbeddingEndpointValidationResponse
26
+ from qanswer_sdk.models.llm_filter_dto import LlmFilterDto
27
+
28
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
29
+ from qanswer_sdk.api_response import ApiResponse
30
+ from qanswer_sdk.rest import RESTResponseType
31
+
32
+
33
+ class ToolEmbedderApi:
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_embedder_endpoint(
48
+ self,
49
+ embedding_endpoint_create: EmbeddingEndpointCreate,
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
+ ) -> EmbedderDetailedDto:
63
+ """Create a new embedder endpoint
64
+
65
+
66
+ :param embedding_endpoint_create: (required)
67
+ :type embedding_endpoint_create: EmbeddingEndpointCreate
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._create_embedder_endpoint_serialize(
91
+ embedding_endpoint_create=embedding_endpoint_create,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "EmbedderDetailedDto",
100
+ }
101
+ response_data = self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ response_data.read()
106
+ return self.api_client.response_deserialize(
107
+ response_data=response_data,
108
+ response_types_map=_response_types_map,
109
+ ).data
110
+
111
+
112
+ @validate_call
113
+ def create_embedder_endpoint_with_http_info(
114
+ self,
115
+ embedding_endpoint_create: EmbeddingEndpointCreate,
116
+ _request_timeout: Union[
117
+ None,
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Tuple[
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Annotated[StrictFloat, Field(gt=0)]
122
+ ]
123
+ ] = None,
124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
+ _content_type: Optional[StrictStr] = None,
126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
+ ) -> ApiResponse[EmbedderDetailedDto]:
129
+ """Create a new embedder endpoint
130
+
131
+
132
+ :param embedding_endpoint_create: (required)
133
+ :type embedding_endpoint_create: EmbeddingEndpointCreate
134
+ :param _request_timeout: timeout setting for this request. If one
135
+ number provided, it will be total request
136
+ timeout. It can also be a pair (tuple) of
137
+ (connection, read) timeouts.
138
+ :type _request_timeout: int, tuple(int, int), optional
139
+ :param _request_auth: set to override the auth_settings for an a single
140
+ request; this effectively ignores the
141
+ authentication in the spec for a single request.
142
+ :type _request_auth: dict, optional
143
+ :param _content_type: force content-type for the request.
144
+ :type _content_type: str, Optional
145
+ :param _headers: set to override the headers for a single
146
+ request; this effectively ignores the headers
147
+ in the spec for a single request.
148
+ :type _headers: dict, optional
149
+ :param _host_index: set to override the host_index for a single
150
+ request; this effectively ignores the host_index
151
+ in the spec for a single request.
152
+ :type _host_index: int, optional
153
+ :return: Returns the result object.
154
+ """ # noqa: E501
155
+
156
+ _param = self._create_embedder_endpoint_serialize(
157
+ embedding_endpoint_create=embedding_endpoint_create,
158
+ _request_auth=_request_auth,
159
+ _content_type=_content_type,
160
+ _headers=_headers,
161
+ _host_index=_host_index
162
+ )
163
+
164
+ _response_types_map: Dict[str, Optional[str]] = {
165
+ '200': "EmbedderDetailedDto",
166
+ }
167
+ response_data = self.api_client.call_api(
168
+ *_param,
169
+ _request_timeout=_request_timeout
170
+ )
171
+ response_data.read()
172
+ return self.api_client.response_deserialize(
173
+ response_data=response_data,
174
+ response_types_map=_response_types_map,
175
+ )
176
+
177
+
178
+ @validate_call
179
+ def create_embedder_endpoint_without_preload_content(
180
+ self,
181
+ embedding_endpoint_create: EmbeddingEndpointCreate,
182
+ _request_timeout: Union[
183
+ None,
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Tuple[
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Annotated[StrictFloat, Field(gt=0)]
188
+ ]
189
+ ] = None,
190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
191
+ _content_type: Optional[StrictStr] = None,
192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
194
+ ) -> RESTResponseType:
195
+ """Create a new embedder endpoint
196
+
197
+
198
+ :param embedding_endpoint_create: (required)
199
+ :type embedding_endpoint_create: EmbeddingEndpointCreate
200
+ :param _request_timeout: timeout setting for this request. If one
201
+ number provided, it will be total request
202
+ timeout. It can also be a pair (tuple) of
203
+ (connection, read) timeouts.
204
+ :type _request_timeout: int, tuple(int, int), optional
205
+ :param _request_auth: set to override the auth_settings for an a single
206
+ request; this effectively ignores the
207
+ authentication in the spec for a single request.
208
+ :type _request_auth: dict, optional
209
+ :param _content_type: force content-type for the request.
210
+ :type _content_type: str, Optional
211
+ :param _headers: set to override the headers for a single
212
+ request; this effectively ignores the headers
213
+ in the spec for a single request.
214
+ :type _headers: dict, optional
215
+ :param _host_index: set to override the host_index for a single
216
+ request; this effectively ignores the host_index
217
+ in the spec for a single request.
218
+ :type _host_index: int, optional
219
+ :return: Returns the result object.
220
+ """ # noqa: E501
221
+
222
+ _param = self._create_embedder_endpoint_serialize(
223
+ embedding_endpoint_create=embedding_endpoint_create,
224
+ _request_auth=_request_auth,
225
+ _content_type=_content_type,
226
+ _headers=_headers,
227
+ _host_index=_host_index
228
+ )
229
+
230
+ _response_types_map: Dict[str, Optional[str]] = {
231
+ '200': "EmbedderDetailedDto",
232
+ }
233
+ response_data = self.api_client.call_api(
234
+ *_param,
235
+ _request_timeout=_request_timeout
236
+ )
237
+ return response_data.response
238
+
239
+
240
+ def _create_embedder_endpoint_serialize(
241
+ self,
242
+ embedding_endpoint_create,
243
+ _request_auth,
244
+ _content_type,
245
+ _headers,
246
+ _host_index,
247
+ ) -> RequestSerialized:
248
+
249
+ _host = None
250
+
251
+ _collection_formats: Dict[str, str] = {
252
+ }
253
+
254
+ _path_params: Dict[str, str] = {}
255
+ _query_params: List[Tuple[str, str]] = []
256
+ _header_params: Dict[str, Optional[str]] = _headers or {}
257
+ _form_params: List[Tuple[str, str]] = []
258
+ _files: Dict[
259
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
260
+ ] = {}
261
+ _body_params: Optional[bytes] = None
262
+
263
+ # process the path parameters
264
+ # process the query parameters
265
+ # process the header parameters
266
+ # process the form parameters
267
+ # process the body parameter
268
+ if embedding_endpoint_create is not None:
269
+ _body_params = embedding_endpoint_create
270
+
271
+
272
+ # set the HTTP header `Accept`
273
+ if 'Accept' not in _header_params:
274
+ _header_params['Accept'] = self.api_client.select_header_accept(
275
+ [
276
+ '*/*'
277
+ ]
278
+ )
279
+
280
+ # set the HTTP header `Content-Type`
281
+ if _content_type:
282
+ _header_params['Content-Type'] = _content_type
283
+ else:
284
+ _default_content_type = (
285
+ self.api_client.select_header_content_type(
286
+ [
287
+ 'application/json'
288
+ ]
289
+ )
290
+ )
291
+ if _default_content_type is not None:
292
+ _header_params['Content-Type'] = _default_content_type
293
+
294
+ # authentication setting
295
+ _auth_settings: List[str] = [
296
+ 'QAnswer-Api-Key',
297
+ 'Bearer'
298
+ ]
299
+
300
+ return self.api_client.param_serialize(
301
+ method='POST',
302
+ resource_path='/api/tool/embedder/',
303
+ path_params=_path_params,
304
+ query_params=_query_params,
305
+ header_params=_header_params,
306
+ body=_body_params,
307
+ post_params=_form_params,
308
+ files=_files,
309
+ auth_settings=_auth_settings,
310
+ collection_formats=_collection_formats,
311
+ _host=_host,
312
+ _request_auth=_request_auth
313
+ )
314
+
315
+
316
+
317
+
318
+ @validate_call
319
+ def delete_embedder_endpoint(
320
+ self,
321
+ id: StrictInt,
322
+ _request_timeout: Union[
323
+ None,
324
+ Annotated[StrictFloat, Field(gt=0)],
325
+ Tuple[
326
+ Annotated[StrictFloat, Field(gt=0)],
327
+ Annotated[StrictFloat, Field(gt=0)]
328
+ ]
329
+ ] = None,
330
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
331
+ _content_type: Optional[StrictStr] = None,
332
+ _headers: Optional[Dict[StrictStr, Any]] = None,
333
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
334
+ ) -> None:
335
+ """Delete an embedder endpoint
336
+
337
+
338
+ :param id: (required)
339
+ :type id: int
340
+ :param _request_timeout: timeout setting for this request. If one
341
+ number provided, it will be total request
342
+ timeout. It can also be a pair (tuple) of
343
+ (connection, read) timeouts.
344
+ :type _request_timeout: int, tuple(int, int), optional
345
+ :param _request_auth: set to override the auth_settings for an a single
346
+ request; this effectively ignores the
347
+ authentication in the spec for a single request.
348
+ :type _request_auth: dict, optional
349
+ :param _content_type: force content-type for the request.
350
+ :type _content_type: str, Optional
351
+ :param _headers: set to override the headers for a single
352
+ request; this effectively ignores the headers
353
+ in the spec for a single request.
354
+ :type _headers: dict, optional
355
+ :param _host_index: set to override the host_index for a single
356
+ request; this effectively ignores the host_index
357
+ in the spec for a single request.
358
+ :type _host_index: int, optional
359
+ :return: Returns the result object.
360
+ """ # noqa: E501
361
+
362
+ _param = self._delete_embedder_endpoint_serialize(
363
+ id=id,
364
+ _request_auth=_request_auth,
365
+ _content_type=_content_type,
366
+ _headers=_headers,
367
+ _host_index=_host_index
368
+ )
369
+
370
+ _response_types_map: Dict[str, Optional[str]] = {
371
+ '200': None,
372
+ }
373
+ response_data = self.api_client.call_api(
374
+ *_param,
375
+ _request_timeout=_request_timeout
376
+ )
377
+ response_data.read()
378
+ return self.api_client.response_deserialize(
379
+ response_data=response_data,
380
+ response_types_map=_response_types_map,
381
+ ).data
382
+
383
+
384
+ @validate_call
385
+ def delete_embedder_endpoint_with_http_info(
386
+ self,
387
+ id: StrictInt,
388
+ _request_timeout: Union[
389
+ None,
390
+ Annotated[StrictFloat, Field(gt=0)],
391
+ Tuple[
392
+ Annotated[StrictFloat, Field(gt=0)],
393
+ Annotated[StrictFloat, Field(gt=0)]
394
+ ]
395
+ ] = None,
396
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
397
+ _content_type: Optional[StrictStr] = None,
398
+ _headers: Optional[Dict[StrictStr, Any]] = None,
399
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
400
+ ) -> ApiResponse[None]:
401
+ """Delete an embedder endpoint
402
+
403
+
404
+ :param id: (required)
405
+ :type id: int
406
+ :param _request_timeout: timeout setting for this request. If one
407
+ number provided, it will be total request
408
+ timeout. It can also be a pair (tuple) of
409
+ (connection, read) timeouts.
410
+ :type _request_timeout: int, tuple(int, int), optional
411
+ :param _request_auth: set to override the auth_settings for an a single
412
+ request; this effectively ignores the
413
+ authentication in the spec for a single request.
414
+ :type _request_auth: dict, optional
415
+ :param _content_type: force content-type for the request.
416
+ :type _content_type: str, Optional
417
+ :param _headers: set to override the headers for a single
418
+ request; this effectively ignores the headers
419
+ in the spec for a single request.
420
+ :type _headers: dict, optional
421
+ :param _host_index: set to override the host_index for a single
422
+ request; this effectively ignores the host_index
423
+ in the spec for a single request.
424
+ :type _host_index: int, optional
425
+ :return: Returns the result object.
426
+ """ # noqa: E501
427
+
428
+ _param = self._delete_embedder_endpoint_serialize(
429
+ id=id,
430
+ _request_auth=_request_auth,
431
+ _content_type=_content_type,
432
+ _headers=_headers,
433
+ _host_index=_host_index
434
+ )
435
+
436
+ _response_types_map: Dict[str, Optional[str]] = {
437
+ '200': None,
438
+ }
439
+ response_data = self.api_client.call_api(
440
+ *_param,
441
+ _request_timeout=_request_timeout
442
+ )
443
+ response_data.read()
444
+ return self.api_client.response_deserialize(
445
+ response_data=response_data,
446
+ response_types_map=_response_types_map,
447
+ )
448
+
449
+
450
+ @validate_call
451
+ def delete_embedder_endpoint_without_preload_content(
452
+ self,
453
+ id: StrictInt,
454
+ _request_timeout: Union[
455
+ None,
456
+ Annotated[StrictFloat, Field(gt=0)],
457
+ Tuple[
458
+ Annotated[StrictFloat, Field(gt=0)],
459
+ Annotated[StrictFloat, Field(gt=0)]
460
+ ]
461
+ ] = None,
462
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
463
+ _content_type: Optional[StrictStr] = None,
464
+ _headers: Optional[Dict[StrictStr, Any]] = None,
465
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
466
+ ) -> RESTResponseType:
467
+ """Delete an embedder endpoint
468
+
469
+
470
+ :param id: (required)
471
+ :type id: int
472
+ :param _request_timeout: timeout setting for this request. If one
473
+ number provided, it will be total request
474
+ timeout. It can also be a pair (tuple) of
475
+ (connection, read) timeouts.
476
+ :type _request_timeout: int, tuple(int, int), optional
477
+ :param _request_auth: set to override the auth_settings for an a single
478
+ request; this effectively ignores the
479
+ authentication in the spec for a single request.
480
+ :type _request_auth: dict, optional
481
+ :param _content_type: force content-type for the request.
482
+ :type _content_type: str, Optional
483
+ :param _headers: set to override the headers for a single
484
+ request; this effectively ignores the headers
485
+ in the spec for a single request.
486
+ :type _headers: dict, optional
487
+ :param _host_index: set to override the host_index for a single
488
+ request; this effectively ignores the host_index
489
+ in the spec for a single request.
490
+ :type _host_index: int, optional
491
+ :return: Returns the result object.
492
+ """ # noqa: E501
493
+
494
+ _param = self._delete_embedder_endpoint_serialize(
495
+ id=id,
496
+ _request_auth=_request_auth,
497
+ _content_type=_content_type,
498
+ _headers=_headers,
499
+ _host_index=_host_index
500
+ )
501
+
502
+ _response_types_map: Dict[str, Optional[str]] = {
503
+ '200': None,
504
+ }
505
+ response_data = self.api_client.call_api(
506
+ *_param,
507
+ _request_timeout=_request_timeout
508
+ )
509
+ return response_data.response
510
+
511
+
512
+ def _delete_embedder_endpoint_serialize(
513
+ self,
514
+ id,
515
+ _request_auth,
516
+ _content_type,
517
+ _headers,
518
+ _host_index,
519
+ ) -> RequestSerialized:
520
+
521
+ _host = None
522
+
523
+ _collection_formats: Dict[str, str] = {
524
+ }
525
+
526
+ _path_params: Dict[str, str] = {}
527
+ _query_params: List[Tuple[str, str]] = []
528
+ _header_params: Dict[str, Optional[str]] = _headers or {}
529
+ _form_params: List[Tuple[str, str]] = []
530
+ _files: Dict[
531
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
532
+ ] = {}
533
+ _body_params: Optional[bytes] = None
534
+
535
+ # process the path parameters
536
+ if id is not None:
537
+ _path_params['id'] = id
538
+ # process the query parameters
539
+ # process the header parameters
540
+ # process the form parameters
541
+ # process the body parameter
542
+
543
+
544
+
545
+
546
+ # authentication setting
547
+ _auth_settings: List[str] = [
548
+ 'QAnswer-Api-Key',
549
+ 'Bearer'
550
+ ]
551
+
552
+ return self.api_client.param_serialize(
553
+ method='DELETE',
554
+ resource_path='/api/tool/embedder/{id}',
555
+ path_params=_path_params,
556
+ query_params=_query_params,
557
+ header_params=_header_params,
558
+ body=_body_params,
559
+ post_params=_form_params,
560
+ files=_files,
561
+ auth_settings=_auth_settings,
562
+ collection_formats=_collection_formats,
563
+ _host=_host,
564
+ _request_auth=_request_auth
565
+ )
566
+
567
+
568
+
569
+
570
+ @validate_call
571
+ def get_by_id1(
572
+ self,
573
+ id: StrictInt,
574
+ _request_timeout: Union[
575
+ None,
576
+ Annotated[StrictFloat, Field(gt=0)],
577
+ Tuple[
578
+ Annotated[StrictFloat, Field(gt=0)],
579
+ Annotated[StrictFloat, Field(gt=0)]
580
+ ]
581
+ ] = None,
582
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
583
+ _content_type: Optional[StrictStr] = None,
584
+ _headers: Optional[Dict[StrictStr, Any]] = None,
585
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
586
+ ) -> EmbedderDetailedDto:
587
+ """Get an embedder endpoint by id
588
+
589
+
590
+ :param id: (required)
591
+ :type id: int
592
+ :param _request_timeout: timeout setting for this request. If one
593
+ number provided, it will be total request
594
+ timeout. It can also be a pair (tuple) of
595
+ (connection, read) timeouts.
596
+ :type _request_timeout: int, tuple(int, int), optional
597
+ :param _request_auth: set to override the auth_settings for an a single
598
+ request; this effectively ignores the
599
+ authentication in the spec for a single request.
600
+ :type _request_auth: dict, optional
601
+ :param _content_type: force content-type for the request.
602
+ :type _content_type: str, Optional
603
+ :param _headers: set to override the headers for a single
604
+ request; this effectively ignores the headers
605
+ in the spec for a single request.
606
+ :type _headers: dict, optional
607
+ :param _host_index: set to override the host_index for a single
608
+ request; this effectively ignores the host_index
609
+ in the spec for a single request.
610
+ :type _host_index: int, optional
611
+ :return: Returns the result object.
612
+ """ # noqa: E501
613
+
614
+ _param = self._get_by_id1_serialize(
615
+ id=id,
616
+ _request_auth=_request_auth,
617
+ _content_type=_content_type,
618
+ _headers=_headers,
619
+ _host_index=_host_index
620
+ )
621
+
622
+ _response_types_map: Dict[str, Optional[str]] = {
623
+ '200': "EmbedderDetailedDto",
624
+ }
625
+ response_data = self.api_client.call_api(
626
+ *_param,
627
+ _request_timeout=_request_timeout
628
+ )
629
+ response_data.read()
630
+ return self.api_client.response_deserialize(
631
+ response_data=response_data,
632
+ response_types_map=_response_types_map,
633
+ ).data
634
+
635
+
636
+ @validate_call
637
+ def get_by_id1_with_http_info(
638
+ self,
639
+ id: StrictInt,
640
+ _request_timeout: Union[
641
+ None,
642
+ Annotated[StrictFloat, Field(gt=0)],
643
+ Tuple[
644
+ Annotated[StrictFloat, Field(gt=0)],
645
+ Annotated[StrictFloat, Field(gt=0)]
646
+ ]
647
+ ] = None,
648
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
649
+ _content_type: Optional[StrictStr] = None,
650
+ _headers: Optional[Dict[StrictStr, Any]] = None,
651
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
652
+ ) -> ApiResponse[EmbedderDetailedDto]:
653
+ """Get an embedder endpoint by id
654
+
655
+
656
+ :param id: (required)
657
+ :type id: int
658
+ :param _request_timeout: timeout setting for this request. If one
659
+ number provided, it will be total request
660
+ timeout. It can also be a pair (tuple) of
661
+ (connection, read) timeouts.
662
+ :type _request_timeout: int, tuple(int, int), optional
663
+ :param _request_auth: set to override the auth_settings for an a single
664
+ request; this effectively ignores the
665
+ authentication in the spec for a single request.
666
+ :type _request_auth: dict, optional
667
+ :param _content_type: force content-type for the request.
668
+ :type _content_type: str, Optional
669
+ :param _headers: set to override the headers for a single
670
+ request; this effectively ignores the headers
671
+ in the spec for a single request.
672
+ :type _headers: dict, optional
673
+ :param _host_index: set to override the host_index for a single
674
+ request; this effectively ignores the host_index
675
+ in the spec for a single request.
676
+ :type _host_index: int, optional
677
+ :return: Returns the result object.
678
+ """ # noqa: E501
679
+
680
+ _param = self._get_by_id1_serialize(
681
+ id=id,
682
+ _request_auth=_request_auth,
683
+ _content_type=_content_type,
684
+ _headers=_headers,
685
+ _host_index=_host_index
686
+ )
687
+
688
+ _response_types_map: Dict[str, Optional[str]] = {
689
+ '200': "EmbedderDetailedDto",
690
+ }
691
+ response_data = self.api_client.call_api(
692
+ *_param,
693
+ _request_timeout=_request_timeout
694
+ )
695
+ response_data.read()
696
+ return self.api_client.response_deserialize(
697
+ response_data=response_data,
698
+ response_types_map=_response_types_map,
699
+ )
700
+
701
+
702
+ @validate_call
703
+ def get_by_id1_without_preload_content(
704
+ self,
705
+ id: StrictInt,
706
+ _request_timeout: Union[
707
+ None,
708
+ Annotated[StrictFloat, Field(gt=0)],
709
+ Tuple[
710
+ Annotated[StrictFloat, Field(gt=0)],
711
+ Annotated[StrictFloat, Field(gt=0)]
712
+ ]
713
+ ] = None,
714
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
715
+ _content_type: Optional[StrictStr] = None,
716
+ _headers: Optional[Dict[StrictStr, Any]] = None,
717
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
718
+ ) -> RESTResponseType:
719
+ """Get an embedder endpoint by id
720
+
721
+
722
+ :param id: (required)
723
+ :type id: int
724
+ :param _request_timeout: timeout setting for this request. If one
725
+ number provided, it will be total request
726
+ timeout. It can also be a pair (tuple) of
727
+ (connection, read) timeouts.
728
+ :type _request_timeout: int, tuple(int, int), optional
729
+ :param _request_auth: set to override the auth_settings for an a single
730
+ request; this effectively ignores the
731
+ authentication in the spec for a single request.
732
+ :type _request_auth: dict, optional
733
+ :param _content_type: force content-type for the request.
734
+ :type _content_type: str, Optional
735
+ :param _headers: set to override the headers for a single
736
+ request; this effectively ignores the headers
737
+ in the spec for a single request.
738
+ :type _headers: dict, optional
739
+ :param _host_index: set to override the host_index for a single
740
+ request; this effectively ignores the host_index
741
+ in the spec for a single request.
742
+ :type _host_index: int, optional
743
+ :return: Returns the result object.
744
+ """ # noqa: E501
745
+
746
+ _param = self._get_by_id1_serialize(
747
+ id=id,
748
+ _request_auth=_request_auth,
749
+ _content_type=_content_type,
750
+ _headers=_headers,
751
+ _host_index=_host_index
752
+ )
753
+
754
+ _response_types_map: Dict[str, Optional[str]] = {
755
+ '200': "EmbedderDetailedDto",
756
+ }
757
+ response_data = self.api_client.call_api(
758
+ *_param,
759
+ _request_timeout=_request_timeout
760
+ )
761
+ return response_data.response
762
+
763
+
764
+ def _get_by_id1_serialize(
765
+ self,
766
+ id,
767
+ _request_auth,
768
+ _content_type,
769
+ _headers,
770
+ _host_index,
771
+ ) -> RequestSerialized:
772
+
773
+ _host = None
774
+
775
+ _collection_formats: Dict[str, str] = {
776
+ }
777
+
778
+ _path_params: Dict[str, str] = {}
779
+ _query_params: List[Tuple[str, str]] = []
780
+ _header_params: Dict[str, Optional[str]] = _headers or {}
781
+ _form_params: List[Tuple[str, str]] = []
782
+ _files: Dict[
783
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
784
+ ] = {}
785
+ _body_params: Optional[bytes] = None
786
+
787
+ # process the path parameters
788
+ if id is not None:
789
+ _path_params['id'] = id
790
+ # process the query parameters
791
+ # process the header parameters
792
+ # process the form parameters
793
+ # process the body parameter
794
+
795
+
796
+ # set the HTTP header `Accept`
797
+ if 'Accept' not in _header_params:
798
+ _header_params['Accept'] = self.api_client.select_header_accept(
799
+ [
800
+ '*/*'
801
+ ]
802
+ )
803
+
804
+
805
+ # authentication setting
806
+ _auth_settings: List[str] = [
807
+ 'QAnswer-Api-Key',
808
+ 'Bearer'
809
+ ]
810
+
811
+ return self.api_client.param_serialize(
812
+ method='GET',
813
+ resource_path='/api/tool/embedder/{id}',
814
+ path_params=_path_params,
815
+ query_params=_query_params,
816
+ header_params=_header_params,
817
+ body=_body_params,
818
+ post_params=_form_params,
819
+ files=_files,
820
+ auth_settings=_auth_settings,
821
+ collection_formats=_collection_formats,
822
+ _host=_host,
823
+ _request_auth=_request_auth
824
+ )
825
+
826
+
827
+
828
+
829
+ @validate_call
830
+ def get_default_embedder_endpoint(
831
+ self,
832
+ organization_id: Optional[StrictInt] = None,
833
+ _request_timeout: Union[
834
+ None,
835
+ Annotated[StrictFloat, Field(gt=0)],
836
+ Tuple[
837
+ Annotated[StrictFloat, Field(gt=0)],
838
+ Annotated[StrictFloat, Field(gt=0)]
839
+ ]
840
+ ] = None,
841
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
842
+ _content_type: Optional[StrictStr] = None,
843
+ _headers: Optional[Dict[StrictStr, Any]] = None,
844
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
845
+ ) -> EmbedderDetailedDto:
846
+ """Retrieves the default embedder endpoint
847
+
848
+
849
+ :param organization_id:
850
+ :type organization_id: int
851
+ :param _request_timeout: timeout setting for this request. If one
852
+ number provided, it will be total request
853
+ timeout. It can also be a pair (tuple) of
854
+ (connection, read) timeouts.
855
+ :type _request_timeout: int, tuple(int, int), optional
856
+ :param _request_auth: set to override the auth_settings for an a single
857
+ request; this effectively ignores the
858
+ authentication in the spec for a single request.
859
+ :type _request_auth: dict, optional
860
+ :param _content_type: force content-type for the request.
861
+ :type _content_type: str, Optional
862
+ :param _headers: set to override the headers for a single
863
+ request; this effectively ignores the headers
864
+ in the spec for a single request.
865
+ :type _headers: dict, optional
866
+ :param _host_index: set to override the host_index for a single
867
+ request; this effectively ignores the host_index
868
+ in the spec for a single request.
869
+ :type _host_index: int, optional
870
+ :return: Returns the result object.
871
+ """ # noqa: E501
872
+
873
+ _param = self._get_default_embedder_endpoint_serialize(
874
+ organization_id=organization_id,
875
+ _request_auth=_request_auth,
876
+ _content_type=_content_type,
877
+ _headers=_headers,
878
+ _host_index=_host_index
879
+ )
880
+
881
+ _response_types_map: Dict[str, Optional[str]] = {
882
+ '200': "EmbedderDetailedDto",
883
+ }
884
+ response_data = self.api_client.call_api(
885
+ *_param,
886
+ _request_timeout=_request_timeout
887
+ )
888
+ response_data.read()
889
+ return self.api_client.response_deserialize(
890
+ response_data=response_data,
891
+ response_types_map=_response_types_map,
892
+ ).data
893
+
894
+
895
+ @validate_call
896
+ def get_default_embedder_endpoint_with_http_info(
897
+ self,
898
+ organization_id: Optional[StrictInt] = None,
899
+ _request_timeout: Union[
900
+ None,
901
+ Annotated[StrictFloat, Field(gt=0)],
902
+ Tuple[
903
+ Annotated[StrictFloat, Field(gt=0)],
904
+ Annotated[StrictFloat, Field(gt=0)]
905
+ ]
906
+ ] = None,
907
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
908
+ _content_type: Optional[StrictStr] = None,
909
+ _headers: Optional[Dict[StrictStr, Any]] = None,
910
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
911
+ ) -> ApiResponse[EmbedderDetailedDto]:
912
+ """Retrieves the default embedder endpoint
913
+
914
+
915
+ :param organization_id:
916
+ :type organization_id: int
917
+ :param _request_timeout: timeout setting for this request. If one
918
+ number provided, it will be total request
919
+ timeout. It can also be a pair (tuple) of
920
+ (connection, read) timeouts.
921
+ :type _request_timeout: int, tuple(int, int), optional
922
+ :param _request_auth: set to override the auth_settings for an a single
923
+ request; this effectively ignores the
924
+ authentication in the spec for a single request.
925
+ :type _request_auth: dict, optional
926
+ :param _content_type: force content-type for the request.
927
+ :type _content_type: str, Optional
928
+ :param _headers: set to override the headers for a single
929
+ request; this effectively ignores the headers
930
+ in the spec for a single request.
931
+ :type _headers: dict, optional
932
+ :param _host_index: set to override the host_index for a single
933
+ request; this effectively ignores the host_index
934
+ in the spec for a single request.
935
+ :type _host_index: int, optional
936
+ :return: Returns the result object.
937
+ """ # noqa: E501
938
+
939
+ _param = self._get_default_embedder_endpoint_serialize(
940
+ organization_id=organization_id,
941
+ _request_auth=_request_auth,
942
+ _content_type=_content_type,
943
+ _headers=_headers,
944
+ _host_index=_host_index
945
+ )
946
+
947
+ _response_types_map: Dict[str, Optional[str]] = {
948
+ '200': "EmbedderDetailedDto",
949
+ }
950
+ response_data = self.api_client.call_api(
951
+ *_param,
952
+ _request_timeout=_request_timeout
953
+ )
954
+ response_data.read()
955
+ return self.api_client.response_deserialize(
956
+ response_data=response_data,
957
+ response_types_map=_response_types_map,
958
+ )
959
+
960
+
961
+ @validate_call
962
+ def get_default_embedder_endpoint_without_preload_content(
963
+ self,
964
+ organization_id: Optional[StrictInt] = None,
965
+ _request_timeout: Union[
966
+ None,
967
+ Annotated[StrictFloat, Field(gt=0)],
968
+ Tuple[
969
+ Annotated[StrictFloat, Field(gt=0)],
970
+ Annotated[StrictFloat, Field(gt=0)]
971
+ ]
972
+ ] = None,
973
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
974
+ _content_type: Optional[StrictStr] = None,
975
+ _headers: Optional[Dict[StrictStr, Any]] = None,
976
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
977
+ ) -> RESTResponseType:
978
+ """Retrieves the default embedder endpoint
979
+
980
+
981
+ :param organization_id:
982
+ :type organization_id: int
983
+ :param _request_timeout: timeout setting for this request. If one
984
+ number provided, it will be total request
985
+ timeout. It can also be a pair (tuple) of
986
+ (connection, read) timeouts.
987
+ :type _request_timeout: int, tuple(int, int), optional
988
+ :param _request_auth: set to override the auth_settings for an a single
989
+ request; this effectively ignores the
990
+ authentication in the spec for a single request.
991
+ :type _request_auth: dict, optional
992
+ :param _content_type: force content-type for the request.
993
+ :type _content_type: str, Optional
994
+ :param _headers: set to override the headers for a single
995
+ request; this effectively ignores the headers
996
+ in the spec for a single request.
997
+ :type _headers: dict, optional
998
+ :param _host_index: set to override the host_index for a single
999
+ request; this effectively ignores the host_index
1000
+ in the spec for a single request.
1001
+ :type _host_index: int, optional
1002
+ :return: Returns the result object.
1003
+ """ # noqa: E501
1004
+
1005
+ _param = self._get_default_embedder_endpoint_serialize(
1006
+ organization_id=organization_id,
1007
+ _request_auth=_request_auth,
1008
+ _content_type=_content_type,
1009
+ _headers=_headers,
1010
+ _host_index=_host_index
1011
+ )
1012
+
1013
+ _response_types_map: Dict[str, Optional[str]] = {
1014
+ '200': "EmbedderDetailedDto",
1015
+ }
1016
+ response_data = self.api_client.call_api(
1017
+ *_param,
1018
+ _request_timeout=_request_timeout
1019
+ )
1020
+ return response_data.response
1021
+
1022
+
1023
+ def _get_default_embedder_endpoint_serialize(
1024
+ self,
1025
+ organization_id,
1026
+ _request_auth,
1027
+ _content_type,
1028
+ _headers,
1029
+ _host_index,
1030
+ ) -> RequestSerialized:
1031
+
1032
+ _host = None
1033
+
1034
+ _collection_formats: Dict[str, str] = {
1035
+ }
1036
+
1037
+ _path_params: Dict[str, str] = {}
1038
+ _query_params: List[Tuple[str, str]] = []
1039
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1040
+ _form_params: List[Tuple[str, str]] = []
1041
+ _files: Dict[
1042
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1043
+ ] = {}
1044
+ _body_params: Optional[bytes] = None
1045
+
1046
+ # process the path parameters
1047
+ # process the query parameters
1048
+ if organization_id is not None:
1049
+
1050
+ _query_params.append(('organization_id', organization_id))
1051
+
1052
+ # process the header parameters
1053
+ # process the form parameters
1054
+ # process the body parameter
1055
+
1056
+
1057
+ # set the HTTP header `Accept`
1058
+ if 'Accept' not in _header_params:
1059
+ _header_params['Accept'] = self.api_client.select_header_accept(
1060
+ [
1061
+ '*/*'
1062
+ ]
1063
+ )
1064
+
1065
+
1066
+ # authentication setting
1067
+ _auth_settings: List[str] = [
1068
+ 'QAnswer-Api-Key',
1069
+ 'Bearer'
1070
+ ]
1071
+
1072
+ return self.api_client.param_serialize(
1073
+ method='GET',
1074
+ resource_path='/api/tool/embedder/default',
1075
+ path_params=_path_params,
1076
+ query_params=_query_params,
1077
+ header_params=_header_params,
1078
+ body=_body_params,
1079
+ post_params=_form_params,
1080
+ files=_files,
1081
+ auth_settings=_auth_settings,
1082
+ collection_formats=_collection_formats,
1083
+ _host=_host,
1084
+ _request_auth=_request_auth
1085
+ )
1086
+
1087
+
1088
+
1089
+
1090
+ @validate_call
1091
+ def get_embedder_endpoint_by_name(
1092
+ self,
1093
+ name: StrictStr,
1094
+ _request_timeout: Union[
1095
+ None,
1096
+ Annotated[StrictFloat, Field(gt=0)],
1097
+ Tuple[
1098
+ Annotated[StrictFloat, Field(gt=0)],
1099
+ Annotated[StrictFloat, Field(gt=0)]
1100
+ ]
1101
+ ] = None,
1102
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1103
+ _content_type: Optional[StrictStr] = None,
1104
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1105
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1106
+ ) -> EmbedderDetailedDto:
1107
+ """Get an embedder endpoint by name
1108
+
1109
+
1110
+ :param name: (required)
1111
+ :type name: str
1112
+ :param _request_timeout: timeout setting for this request. If one
1113
+ number provided, it will be total request
1114
+ timeout. It can also be a pair (tuple) of
1115
+ (connection, read) timeouts.
1116
+ :type _request_timeout: int, tuple(int, int), optional
1117
+ :param _request_auth: set to override the auth_settings for an a single
1118
+ request; this effectively ignores the
1119
+ authentication in the spec for a single request.
1120
+ :type _request_auth: dict, optional
1121
+ :param _content_type: force content-type for the request.
1122
+ :type _content_type: str, Optional
1123
+ :param _headers: set to override the headers for a single
1124
+ request; this effectively ignores the headers
1125
+ in the spec for a single request.
1126
+ :type _headers: dict, optional
1127
+ :param _host_index: set to override the host_index for a single
1128
+ request; this effectively ignores the host_index
1129
+ in the spec for a single request.
1130
+ :type _host_index: int, optional
1131
+ :return: Returns the result object.
1132
+ """ # noqa: E501
1133
+
1134
+ _param = self._get_embedder_endpoint_by_name_serialize(
1135
+ name=name,
1136
+ _request_auth=_request_auth,
1137
+ _content_type=_content_type,
1138
+ _headers=_headers,
1139
+ _host_index=_host_index
1140
+ )
1141
+
1142
+ _response_types_map: Dict[str, Optional[str]] = {
1143
+ '200': "EmbedderDetailedDto",
1144
+ }
1145
+ response_data = self.api_client.call_api(
1146
+ *_param,
1147
+ _request_timeout=_request_timeout
1148
+ )
1149
+ response_data.read()
1150
+ return self.api_client.response_deserialize(
1151
+ response_data=response_data,
1152
+ response_types_map=_response_types_map,
1153
+ ).data
1154
+
1155
+
1156
+ @validate_call
1157
+ def get_embedder_endpoint_by_name_with_http_info(
1158
+ self,
1159
+ name: StrictStr,
1160
+ _request_timeout: Union[
1161
+ None,
1162
+ Annotated[StrictFloat, Field(gt=0)],
1163
+ Tuple[
1164
+ Annotated[StrictFloat, Field(gt=0)],
1165
+ Annotated[StrictFloat, Field(gt=0)]
1166
+ ]
1167
+ ] = None,
1168
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1169
+ _content_type: Optional[StrictStr] = None,
1170
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1171
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1172
+ ) -> ApiResponse[EmbedderDetailedDto]:
1173
+ """Get an embedder endpoint by name
1174
+
1175
+
1176
+ :param name: (required)
1177
+ :type name: str
1178
+ :param _request_timeout: timeout setting for this request. If one
1179
+ number provided, it will be total request
1180
+ timeout. It can also be a pair (tuple) of
1181
+ (connection, read) timeouts.
1182
+ :type _request_timeout: int, tuple(int, int), optional
1183
+ :param _request_auth: set to override the auth_settings for an a single
1184
+ request; this effectively ignores the
1185
+ authentication in the spec for a single request.
1186
+ :type _request_auth: dict, optional
1187
+ :param _content_type: force content-type for the request.
1188
+ :type _content_type: str, Optional
1189
+ :param _headers: set to override the headers for a single
1190
+ request; this effectively ignores the headers
1191
+ in the spec for a single request.
1192
+ :type _headers: dict, optional
1193
+ :param _host_index: set to override the host_index for a single
1194
+ request; this effectively ignores the host_index
1195
+ in the spec for a single request.
1196
+ :type _host_index: int, optional
1197
+ :return: Returns the result object.
1198
+ """ # noqa: E501
1199
+
1200
+ _param = self._get_embedder_endpoint_by_name_serialize(
1201
+ name=name,
1202
+ _request_auth=_request_auth,
1203
+ _content_type=_content_type,
1204
+ _headers=_headers,
1205
+ _host_index=_host_index
1206
+ )
1207
+
1208
+ _response_types_map: Dict[str, Optional[str]] = {
1209
+ '200': "EmbedderDetailedDto",
1210
+ }
1211
+ response_data = self.api_client.call_api(
1212
+ *_param,
1213
+ _request_timeout=_request_timeout
1214
+ )
1215
+ response_data.read()
1216
+ return self.api_client.response_deserialize(
1217
+ response_data=response_data,
1218
+ response_types_map=_response_types_map,
1219
+ )
1220
+
1221
+
1222
+ @validate_call
1223
+ def get_embedder_endpoint_by_name_without_preload_content(
1224
+ self,
1225
+ name: StrictStr,
1226
+ _request_timeout: Union[
1227
+ None,
1228
+ Annotated[StrictFloat, Field(gt=0)],
1229
+ Tuple[
1230
+ Annotated[StrictFloat, Field(gt=0)],
1231
+ Annotated[StrictFloat, Field(gt=0)]
1232
+ ]
1233
+ ] = None,
1234
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1235
+ _content_type: Optional[StrictStr] = None,
1236
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1237
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1238
+ ) -> RESTResponseType:
1239
+ """Get an embedder endpoint by name
1240
+
1241
+
1242
+ :param name: (required)
1243
+ :type name: str
1244
+ :param _request_timeout: timeout setting for this request. If one
1245
+ number provided, it will be total request
1246
+ timeout. It can also be a pair (tuple) of
1247
+ (connection, read) timeouts.
1248
+ :type _request_timeout: int, tuple(int, int), optional
1249
+ :param _request_auth: set to override the auth_settings for an a single
1250
+ request; this effectively ignores the
1251
+ authentication in the spec for a single request.
1252
+ :type _request_auth: dict, optional
1253
+ :param _content_type: force content-type for the request.
1254
+ :type _content_type: str, Optional
1255
+ :param _headers: set to override the headers for a single
1256
+ request; this effectively ignores the headers
1257
+ in the spec for a single request.
1258
+ :type _headers: dict, optional
1259
+ :param _host_index: set to override the host_index for a single
1260
+ request; this effectively ignores the host_index
1261
+ in the spec for a single request.
1262
+ :type _host_index: int, optional
1263
+ :return: Returns the result object.
1264
+ """ # noqa: E501
1265
+
1266
+ _param = self._get_embedder_endpoint_by_name_serialize(
1267
+ name=name,
1268
+ _request_auth=_request_auth,
1269
+ _content_type=_content_type,
1270
+ _headers=_headers,
1271
+ _host_index=_host_index
1272
+ )
1273
+
1274
+ _response_types_map: Dict[str, Optional[str]] = {
1275
+ '200': "EmbedderDetailedDto",
1276
+ }
1277
+ response_data = self.api_client.call_api(
1278
+ *_param,
1279
+ _request_timeout=_request_timeout
1280
+ )
1281
+ return response_data.response
1282
+
1283
+
1284
+ def _get_embedder_endpoint_by_name_serialize(
1285
+ self,
1286
+ name,
1287
+ _request_auth,
1288
+ _content_type,
1289
+ _headers,
1290
+ _host_index,
1291
+ ) -> RequestSerialized:
1292
+
1293
+ _host = None
1294
+
1295
+ _collection_formats: Dict[str, str] = {
1296
+ }
1297
+
1298
+ _path_params: Dict[str, str] = {}
1299
+ _query_params: List[Tuple[str, str]] = []
1300
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1301
+ _form_params: List[Tuple[str, str]] = []
1302
+ _files: Dict[
1303
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1304
+ ] = {}
1305
+ _body_params: Optional[bytes] = None
1306
+
1307
+ # process the path parameters
1308
+ # process the query parameters
1309
+ if name is not None:
1310
+
1311
+ _query_params.append(('name', name))
1312
+
1313
+ # process the header parameters
1314
+ # process the form parameters
1315
+ # process the body parameter
1316
+
1317
+
1318
+ # set the HTTP header `Accept`
1319
+ if 'Accept' not in _header_params:
1320
+ _header_params['Accept'] = self.api_client.select_header_accept(
1321
+ [
1322
+ '*/*'
1323
+ ]
1324
+ )
1325
+
1326
+
1327
+ # authentication setting
1328
+ _auth_settings: List[str] = [
1329
+ 'QAnswer-Api-Key',
1330
+ 'Bearer'
1331
+ ]
1332
+
1333
+ return self.api_client.param_serialize(
1334
+ method='GET',
1335
+ resource_path='/api/tool/embedder/by-name',
1336
+ path_params=_path_params,
1337
+ query_params=_query_params,
1338
+ header_params=_header_params,
1339
+ body=_body_params,
1340
+ post_params=_form_params,
1341
+ files=_files,
1342
+ auth_settings=_auth_settings,
1343
+ collection_formats=_collection_formats,
1344
+ _host=_host,
1345
+ _request_auth=_request_auth
1346
+ )
1347
+
1348
+
1349
+
1350
+
1351
+ @validate_call
1352
+ def get_embedder_endpoint_logo(
1353
+ self,
1354
+ id: StrictInt,
1355
+ _request_timeout: Union[
1356
+ None,
1357
+ Annotated[StrictFloat, Field(gt=0)],
1358
+ Tuple[
1359
+ Annotated[StrictFloat, Field(gt=0)],
1360
+ Annotated[StrictFloat, Field(gt=0)]
1361
+ ]
1362
+ ] = None,
1363
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1364
+ _content_type: Optional[StrictStr] = None,
1365
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1366
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1367
+ ) -> bytearray:
1368
+ """Get the logo of an embedder endpoint by id
1369
+
1370
+
1371
+ :param id: (required)
1372
+ :type id: int
1373
+ :param _request_timeout: timeout setting for this request. If one
1374
+ number provided, it will be total request
1375
+ timeout. It can also be a pair (tuple) of
1376
+ (connection, read) timeouts.
1377
+ :type _request_timeout: int, tuple(int, int), optional
1378
+ :param _request_auth: set to override the auth_settings for an a single
1379
+ request; this effectively ignores the
1380
+ authentication in the spec for a single request.
1381
+ :type _request_auth: dict, optional
1382
+ :param _content_type: force content-type for the request.
1383
+ :type _content_type: str, Optional
1384
+ :param _headers: set to override the headers for a single
1385
+ request; this effectively ignores the headers
1386
+ in the spec for a single request.
1387
+ :type _headers: dict, optional
1388
+ :param _host_index: set to override the host_index for a single
1389
+ request; this effectively ignores the host_index
1390
+ in the spec for a single request.
1391
+ :type _host_index: int, optional
1392
+ :return: Returns the result object.
1393
+ """ # noqa: E501
1394
+
1395
+ _param = self._get_embedder_endpoint_logo_serialize(
1396
+ id=id,
1397
+ _request_auth=_request_auth,
1398
+ _content_type=_content_type,
1399
+ _headers=_headers,
1400
+ _host_index=_host_index
1401
+ )
1402
+
1403
+ _response_types_map: Dict[str, Optional[str]] = {
1404
+ '200': "bytearray",
1405
+ }
1406
+ response_data = self.api_client.call_api(
1407
+ *_param,
1408
+ _request_timeout=_request_timeout
1409
+ )
1410
+ response_data.read()
1411
+ return self.api_client.response_deserialize(
1412
+ response_data=response_data,
1413
+ response_types_map=_response_types_map,
1414
+ ).data
1415
+
1416
+
1417
+ @validate_call
1418
+ def get_embedder_endpoint_logo_with_http_info(
1419
+ self,
1420
+ id: StrictInt,
1421
+ _request_timeout: Union[
1422
+ None,
1423
+ Annotated[StrictFloat, Field(gt=0)],
1424
+ Tuple[
1425
+ Annotated[StrictFloat, Field(gt=0)],
1426
+ Annotated[StrictFloat, Field(gt=0)]
1427
+ ]
1428
+ ] = None,
1429
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1430
+ _content_type: Optional[StrictStr] = None,
1431
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1432
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1433
+ ) -> ApiResponse[bytearray]:
1434
+ """Get the logo of an embedder endpoint by id
1435
+
1436
+
1437
+ :param id: (required)
1438
+ :type id: int
1439
+ :param _request_timeout: timeout setting for this request. If one
1440
+ number provided, it will be total request
1441
+ timeout. It can also be a pair (tuple) of
1442
+ (connection, read) timeouts.
1443
+ :type _request_timeout: int, tuple(int, int), optional
1444
+ :param _request_auth: set to override the auth_settings for an a single
1445
+ request; this effectively ignores the
1446
+ authentication in the spec for a single request.
1447
+ :type _request_auth: dict, optional
1448
+ :param _content_type: force content-type for the request.
1449
+ :type _content_type: str, Optional
1450
+ :param _headers: set to override the headers for a single
1451
+ request; this effectively ignores the headers
1452
+ in the spec for a single request.
1453
+ :type _headers: dict, optional
1454
+ :param _host_index: set to override the host_index for a single
1455
+ request; this effectively ignores the host_index
1456
+ in the spec for a single request.
1457
+ :type _host_index: int, optional
1458
+ :return: Returns the result object.
1459
+ """ # noqa: E501
1460
+
1461
+ _param = self._get_embedder_endpoint_logo_serialize(
1462
+ id=id,
1463
+ _request_auth=_request_auth,
1464
+ _content_type=_content_type,
1465
+ _headers=_headers,
1466
+ _host_index=_host_index
1467
+ )
1468
+
1469
+ _response_types_map: Dict[str, Optional[str]] = {
1470
+ '200': "bytearray",
1471
+ }
1472
+ response_data = self.api_client.call_api(
1473
+ *_param,
1474
+ _request_timeout=_request_timeout
1475
+ )
1476
+ response_data.read()
1477
+ return self.api_client.response_deserialize(
1478
+ response_data=response_data,
1479
+ response_types_map=_response_types_map,
1480
+ )
1481
+
1482
+
1483
+ @validate_call
1484
+ def get_embedder_endpoint_logo_without_preload_content(
1485
+ self,
1486
+ id: StrictInt,
1487
+ _request_timeout: Union[
1488
+ None,
1489
+ Annotated[StrictFloat, Field(gt=0)],
1490
+ Tuple[
1491
+ Annotated[StrictFloat, Field(gt=0)],
1492
+ Annotated[StrictFloat, Field(gt=0)]
1493
+ ]
1494
+ ] = None,
1495
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1496
+ _content_type: Optional[StrictStr] = None,
1497
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1498
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1499
+ ) -> RESTResponseType:
1500
+ """Get the logo of an embedder endpoint by id
1501
+
1502
+
1503
+ :param id: (required)
1504
+ :type id: int
1505
+ :param _request_timeout: timeout setting for this request. If one
1506
+ number provided, it will be total request
1507
+ timeout. It can also be a pair (tuple) of
1508
+ (connection, read) timeouts.
1509
+ :type _request_timeout: int, tuple(int, int), optional
1510
+ :param _request_auth: set to override the auth_settings for an a single
1511
+ request; this effectively ignores the
1512
+ authentication in the spec for a single request.
1513
+ :type _request_auth: dict, optional
1514
+ :param _content_type: force content-type for the request.
1515
+ :type _content_type: str, Optional
1516
+ :param _headers: set to override the headers for a single
1517
+ request; this effectively ignores the headers
1518
+ in the spec for a single request.
1519
+ :type _headers: dict, optional
1520
+ :param _host_index: set to override the host_index for a single
1521
+ request; this effectively ignores the host_index
1522
+ in the spec for a single request.
1523
+ :type _host_index: int, optional
1524
+ :return: Returns the result object.
1525
+ """ # noqa: E501
1526
+
1527
+ _param = self._get_embedder_endpoint_logo_serialize(
1528
+ id=id,
1529
+ _request_auth=_request_auth,
1530
+ _content_type=_content_type,
1531
+ _headers=_headers,
1532
+ _host_index=_host_index
1533
+ )
1534
+
1535
+ _response_types_map: Dict[str, Optional[str]] = {
1536
+ '200': "bytearray",
1537
+ }
1538
+ response_data = self.api_client.call_api(
1539
+ *_param,
1540
+ _request_timeout=_request_timeout
1541
+ )
1542
+ return response_data.response
1543
+
1544
+
1545
+ def _get_embedder_endpoint_logo_serialize(
1546
+ self,
1547
+ id,
1548
+ _request_auth,
1549
+ _content_type,
1550
+ _headers,
1551
+ _host_index,
1552
+ ) -> RequestSerialized:
1553
+
1554
+ _host = None
1555
+
1556
+ _collection_formats: Dict[str, str] = {
1557
+ }
1558
+
1559
+ _path_params: Dict[str, str] = {}
1560
+ _query_params: List[Tuple[str, str]] = []
1561
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1562
+ _form_params: List[Tuple[str, str]] = []
1563
+ _files: Dict[
1564
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1565
+ ] = {}
1566
+ _body_params: Optional[bytes] = None
1567
+
1568
+ # process the path parameters
1569
+ if id is not None:
1570
+ _path_params['id'] = id
1571
+ # process the query parameters
1572
+ # process the header parameters
1573
+ # process the form parameters
1574
+ # process the body parameter
1575
+
1576
+
1577
+ # set the HTTP header `Accept`
1578
+ if 'Accept' not in _header_params:
1579
+ _header_params['Accept'] = self.api_client.select_header_accept(
1580
+ [
1581
+ '*/*'
1582
+ ]
1583
+ )
1584
+
1585
+
1586
+ # authentication setting
1587
+ _auth_settings: List[str] = [
1588
+ 'QAnswer-Api-Key',
1589
+ 'Bearer'
1590
+ ]
1591
+
1592
+ return self.api_client.param_serialize(
1593
+ method='GET',
1594
+ resource_path='/api/tool/embedder/{id}/logo',
1595
+ path_params=_path_params,
1596
+ query_params=_query_params,
1597
+ header_params=_header_params,
1598
+ body=_body_params,
1599
+ post_params=_form_params,
1600
+ files=_files,
1601
+ auth_settings=_auth_settings,
1602
+ collection_formats=_collection_formats,
1603
+ _host=_host,
1604
+ _request_auth=_request_auth
1605
+ )
1606
+
1607
+
1608
+
1609
+
1610
+ @validate_call
1611
+ def get_is_active1(
1612
+ self,
1613
+ id: StrictInt,
1614
+ organization_id: Optional[StrictInt] = None,
1615
+ _request_timeout: Union[
1616
+ None,
1617
+ Annotated[StrictFloat, Field(gt=0)],
1618
+ Tuple[
1619
+ Annotated[StrictFloat, Field(gt=0)],
1620
+ Annotated[StrictFloat, Field(gt=0)]
1621
+ ]
1622
+ ] = None,
1623
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1624
+ _content_type: Optional[StrictStr] = None,
1625
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1626
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1627
+ ) -> bool:
1628
+ """Returns if the LLM endpoint is active. If the organization ID is provided, it checks if the endpoint is active for that organization otherwise for the whole application.
1629
+
1630
+
1631
+ :param id: (required)
1632
+ :type id: int
1633
+ :param organization_id:
1634
+ :type organization_id: int
1635
+ :param _request_timeout: timeout setting for this request. If one
1636
+ number provided, it will be total request
1637
+ timeout. It can also be a pair (tuple) of
1638
+ (connection, read) timeouts.
1639
+ :type _request_timeout: int, tuple(int, int), optional
1640
+ :param _request_auth: set to override the auth_settings for an a single
1641
+ request; this effectively ignores the
1642
+ authentication in the spec for a single request.
1643
+ :type _request_auth: dict, optional
1644
+ :param _content_type: force content-type for the request.
1645
+ :type _content_type: str, Optional
1646
+ :param _headers: set to override the headers for a single
1647
+ request; this effectively ignores the headers
1648
+ in the spec for a single request.
1649
+ :type _headers: dict, optional
1650
+ :param _host_index: set to override the host_index for a single
1651
+ request; this effectively ignores the host_index
1652
+ in the spec for a single request.
1653
+ :type _host_index: int, optional
1654
+ :return: Returns the result object.
1655
+ """ # noqa: E501
1656
+
1657
+ _param = self._get_is_active1_serialize(
1658
+ id=id,
1659
+ organization_id=organization_id,
1660
+ _request_auth=_request_auth,
1661
+ _content_type=_content_type,
1662
+ _headers=_headers,
1663
+ _host_index=_host_index
1664
+ )
1665
+
1666
+ _response_types_map: Dict[str, Optional[str]] = {
1667
+ '200': "bool",
1668
+ }
1669
+ response_data = self.api_client.call_api(
1670
+ *_param,
1671
+ _request_timeout=_request_timeout
1672
+ )
1673
+ response_data.read()
1674
+ return self.api_client.response_deserialize(
1675
+ response_data=response_data,
1676
+ response_types_map=_response_types_map,
1677
+ ).data
1678
+
1679
+
1680
+ @validate_call
1681
+ def get_is_active1_with_http_info(
1682
+ self,
1683
+ id: StrictInt,
1684
+ organization_id: Optional[StrictInt] = None,
1685
+ _request_timeout: Union[
1686
+ None,
1687
+ Annotated[StrictFloat, Field(gt=0)],
1688
+ Tuple[
1689
+ Annotated[StrictFloat, Field(gt=0)],
1690
+ Annotated[StrictFloat, Field(gt=0)]
1691
+ ]
1692
+ ] = None,
1693
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1694
+ _content_type: Optional[StrictStr] = None,
1695
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1696
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1697
+ ) -> ApiResponse[bool]:
1698
+ """Returns if the LLM endpoint is active. If the organization ID is provided, it checks if the endpoint is active for that organization otherwise for the whole application.
1699
+
1700
+
1701
+ :param id: (required)
1702
+ :type id: int
1703
+ :param organization_id:
1704
+ :type organization_id: int
1705
+ :param _request_timeout: timeout setting for this request. If one
1706
+ number provided, it will be total request
1707
+ timeout. It can also be a pair (tuple) of
1708
+ (connection, read) timeouts.
1709
+ :type _request_timeout: int, tuple(int, int), optional
1710
+ :param _request_auth: set to override the auth_settings for an a single
1711
+ request; this effectively ignores the
1712
+ authentication in the spec for a single request.
1713
+ :type _request_auth: dict, optional
1714
+ :param _content_type: force content-type for the request.
1715
+ :type _content_type: str, Optional
1716
+ :param _headers: set to override the headers for a single
1717
+ request; this effectively ignores the headers
1718
+ in the spec for a single request.
1719
+ :type _headers: dict, optional
1720
+ :param _host_index: set to override the host_index for a single
1721
+ request; this effectively ignores the host_index
1722
+ in the spec for a single request.
1723
+ :type _host_index: int, optional
1724
+ :return: Returns the result object.
1725
+ """ # noqa: E501
1726
+
1727
+ _param = self._get_is_active1_serialize(
1728
+ id=id,
1729
+ organization_id=organization_id,
1730
+ _request_auth=_request_auth,
1731
+ _content_type=_content_type,
1732
+ _headers=_headers,
1733
+ _host_index=_host_index
1734
+ )
1735
+
1736
+ _response_types_map: Dict[str, Optional[str]] = {
1737
+ '200': "bool",
1738
+ }
1739
+ response_data = self.api_client.call_api(
1740
+ *_param,
1741
+ _request_timeout=_request_timeout
1742
+ )
1743
+ response_data.read()
1744
+ return self.api_client.response_deserialize(
1745
+ response_data=response_data,
1746
+ response_types_map=_response_types_map,
1747
+ )
1748
+
1749
+
1750
+ @validate_call
1751
+ def get_is_active1_without_preload_content(
1752
+ self,
1753
+ id: StrictInt,
1754
+ organization_id: Optional[StrictInt] = None,
1755
+ _request_timeout: Union[
1756
+ None,
1757
+ Annotated[StrictFloat, Field(gt=0)],
1758
+ Tuple[
1759
+ Annotated[StrictFloat, Field(gt=0)],
1760
+ Annotated[StrictFloat, Field(gt=0)]
1761
+ ]
1762
+ ] = None,
1763
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1764
+ _content_type: Optional[StrictStr] = None,
1765
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1766
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1767
+ ) -> RESTResponseType:
1768
+ """Returns if the LLM endpoint is active. If the organization ID is provided, it checks if the endpoint is active for that organization otherwise for the whole application.
1769
+
1770
+
1771
+ :param id: (required)
1772
+ :type id: int
1773
+ :param organization_id:
1774
+ :type organization_id: int
1775
+ :param _request_timeout: timeout setting for this request. If one
1776
+ number provided, it will be total request
1777
+ timeout. It can also be a pair (tuple) of
1778
+ (connection, read) timeouts.
1779
+ :type _request_timeout: int, tuple(int, int), optional
1780
+ :param _request_auth: set to override the auth_settings for an a single
1781
+ request; this effectively ignores the
1782
+ authentication in the spec for a single request.
1783
+ :type _request_auth: dict, optional
1784
+ :param _content_type: force content-type for the request.
1785
+ :type _content_type: str, Optional
1786
+ :param _headers: set to override the headers for a single
1787
+ request; this effectively ignores the headers
1788
+ in the spec for a single request.
1789
+ :type _headers: dict, optional
1790
+ :param _host_index: set to override the host_index for a single
1791
+ request; this effectively ignores the host_index
1792
+ in the spec for a single request.
1793
+ :type _host_index: int, optional
1794
+ :return: Returns the result object.
1795
+ """ # noqa: E501
1796
+
1797
+ _param = self._get_is_active1_serialize(
1798
+ id=id,
1799
+ organization_id=organization_id,
1800
+ _request_auth=_request_auth,
1801
+ _content_type=_content_type,
1802
+ _headers=_headers,
1803
+ _host_index=_host_index
1804
+ )
1805
+
1806
+ _response_types_map: Dict[str, Optional[str]] = {
1807
+ '200': "bool",
1808
+ }
1809
+ response_data = self.api_client.call_api(
1810
+ *_param,
1811
+ _request_timeout=_request_timeout
1812
+ )
1813
+ return response_data.response
1814
+
1815
+
1816
+ def _get_is_active1_serialize(
1817
+ self,
1818
+ id,
1819
+ organization_id,
1820
+ _request_auth,
1821
+ _content_type,
1822
+ _headers,
1823
+ _host_index,
1824
+ ) -> RequestSerialized:
1825
+
1826
+ _host = None
1827
+
1828
+ _collection_formats: Dict[str, str] = {
1829
+ }
1830
+
1831
+ _path_params: Dict[str, str] = {}
1832
+ _query_params: List[Tuple[str, str]] = []
1833
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1834
+ _form_params: List[Tuple[str, str]] = []
1835
+ _files: Dict[
1836
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1837
+ ] = {}
1838
+ _body_params: Optional[bytes] = None
1839
+
1840
+ # process the path parameters
1841
+ if id is not None:
1842
+ _path_params['id'] = id
1843
+ # process the query parameters
1844
+ if organization_id is not None:
1845
+
1846
+ _query_params.append(('organizationId', organization_id))
1847
+
1848
+ # process the header parameters
1849
+ # process the form parameters
1850
+ # process the body parameter
1851
+
1852
+
1853
+ # set the HTTP header `Accept`
1854
+ if 'Accept' not in _header_params:
1855
+ _header_params['Accept'] = self.api_client.select_header_accept(
1856
+ [
1857
+ '*/*'
1858
+ ]
1859
+ )
1860
+
1861
+
1862
+ # authentication setting
1863
+ _auth_settings: List[str] = [
1864
+ 'QAnswer-Api-Key',
1865
+ 'Bearer'
1866
+ ]
1867
+
1868
+ return self.api_client.param_serialize(
1869
+ method='GET',
1870
+ resource_path='/api/tool/embedder/{id}/active',
1871
+ path_params=_path_params,
1872
+ query_params=_query_params,
1873
+ header_params=_header_params,
1874
+ body=_body_params,
1875
+ post_params=_form_params,
1876
+ files=_files,
1877
+ auth_settings=_auth_settings,
1878
+ collection_formats=_collection_formats,
1879
+ _host=_host,
1880
+ _request_auth=_request_auth
1881
+ )
1882
+
1883
+
1884
+
1885
+
1886
+ @validate_call
1887
+ def reset_embedder_endpoint_logo(
1888
+ self,
1889
+ id: StrictInt,
1890
+ _request_timeout: Union[
1891
+ None,
1892
+ Annotated[StrictFloat, Field(gt=0)],
1893
+ Tuple[
1894
+ Annotated[StrictFloat, Field(gt=0)],
1895
+ Annotated[StrictFloat, Field(gt=0)]
1896
+ ]
1897
+ ] = None,
1898
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1899
+ _content_type: Optional[StrictStr] = None,
1900
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1901
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1902
+ ) -> None:
1903
+ """Reset the logo of an embedder endpoint by id
1904
+
1905
+
1906
+ :param id: (required)
1907
+ :type id: int
1908
+ :param _request_timeout: timeout setting for this request. If one
1909
+ number provided, it will be total request
1910
+ timeout. It can also be a pair (tuple) of
1911
+ (connection, read) timeouts.
1912
+ :type _request_timeout: int, tuple(int, int), optional
1913
+ :param _request_auth: set to override the auth_settings for an a single
1914
+ request; this effectively ignores the
1915
+ authentication in the spec for a single request.
1916
+ :type _request_auth: dict, optional
1917
+ :param _content_type: force content-type for the request.
1918
+ :type _content_type: str, Optional
1919
+ :param _headers: set to override the headers for a single
1920
+ request; this effectively ignores the headers
1921
+ in the spec for a single request.
1922
+ :type _headers: dict, optional
1923
+ :param _host_index: set to override the host_index for a single
1924
+ request; this effectively ignores the host_index
1925
+ in the spec for a single request.
1926
+ :type _host_index: int, optional
1927
+ :return: Returns the result object.
1928
+ """ # noqa: E501
1929
+
1930
+ _param = self._reset_embedder_endpoint_logo_serialize(
1931
+ id=id,
1932
+ _request_auth=_request_auth,
1933
+ _content_type=_content_type,
1934
+ _headers=_headers,
1935
+ _host_index=_host_index
1936
+ )
1937
+
1938
+ _response_types_map: Dict[str, Optional[str]] = {
1939
+ '200': None,
1940
+ }
1941
+ response_data = self.api_client.call_api(
1942
+ *_param,
1943
+ _request_timeout=_request_timeout
1944
+ )
1945
+ response_data.read()
1946
+ return self.api_client.response_deserialize(
1947
+ response_data=response_data,
1948
+ response_types_map=_response_types_map,
1949
+ ).data
1950
+
1951
+
1952
+ @validate_call
1953
+ def reset_embedder_endpoint_logo_with_http_info(
1954
+ self,
1955
+ id: StrictInt,
1956
+ _request_timeout: Union[
1957
+ None,
1958
+ Annotated[StrictFloat, Field(gt=0)],
1959
+ Tuple[
1960
+ Annotated[StrictFloat, Field(gt=0)],
1961
+ Annotated[StrictFloat, Field(gt=0)]
1962
+ ]
1963
+ ] = None,
1964
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1965
+ _content_type: Optional[StrictStr] = None,
1966
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1967
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1968
+ ) -> ApiResponse[None]:
1969
+ """Reset the logo of an embedder endpoint by id
1970
+
1971
+
1972
+ :param id: (required)
1973
+ :type id: int
1974
+ :param _request_timeout: timeout setting for this request. If one
1975
+ number provided, it will be total request
1976
+ timeout. It can also be a pair (tuple) of
1977
+ (connection, read) timeouts.
1978
+ :type _request_timeout: int, tuple(int, int), optional
1979
+ :param _request_auth: set to override the auth_settings for an a single
1980
+ request; this effectively ignores the
1981
+ authentication in the spec for a single request.
1982
+ :type _request_auth: dict, optional
1983
+ :param _content_type: force content-type for the request.
1984
+ :type _content_type: str, Optional
1985
+ :param _headers: set to override the headers for a single
1986
+ request; this effectively ignores the headers
1987
+ in the spec for a single request.
1988
+ :type _headers: dict, optional
1989
+ :param _host_index: set to override the host_index for a single
1990
+ request; this effectively ignores the host_index
1991
+ in the spec for a single request.
1992
+ :type _host_index: int, optional
1993
+ :return: Returns the result object.
1994
+ """ # noqa: E501
1995
+
1996
+ _param = self._reset_embedder_endpoint_logo_serialize(
1997
+ id=id,
1998
+ _request_auth=_request_auth,
1999
+ _content_type=_content_type,
2000
+ _headers=_headers,
2001
+ _host_index=_host_index
2002
+ )
2003
+
2004
+ _response_types_map: Dict[str, Optional[str]] = {
2005
+ '200': None,
2006
+ }
2007
+ response_data = self.api_client.call_api(
2008
+ *_param,
2009
+ _request_timeout=_request_timeout
2010
+ )
2011
+ response_data.read()
2012
+ return self.api_client.response_deserialize(
2013
+ response_data=response_data,
2014
+ response_types_map=_response_types_map,
2015
+ )
2016
+
2017
+
2018
+ @validate_call
2019
+ def reset_embedder_endpoint_logo_without_preload_content(
2020
+ self,
2021
+ id: StrictInt,
2022
+ _request_timeout: Union[
2023
+ None,
2024
+ Annotated[StrictFloat, Field(gt=0)],
2025
+ Tuple[
2026
+ Annotated[StrictFloat, Field(gt=0)],
2027
+ Annotated[StrictFloat, Field(gt=0)]
2028
+ ]
2029
+ ] = None,
2030
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2031
+ _content_type: Optional[StrictStr] = None,
2032
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2033
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2034
+ ) -> RESTResponseType:
2035
+ """Reset the logo of an embedder endpoint by id
2036
+
2037
+
2038
+ :param id: (required)
2039
+ :type id: int
2040
+ :param _request_timeout: timeout setting for this request. If one
2041
+ number provided, it will be total request
2042
+ timeout. It can also be a pair (tuple) of
2043
+ (connection, read) timeouts.
2044
+ :type _request_timeout: int, tuple(int, int), optional
2045
+ :param _request_auth: set to override the auth_settings for an a single
2046
+ request; this effectively ignores the
2047
+ authentication in the spec for a single request.
2048
+ :type _request_auth: dict, optional
2049
+ :param _content_type: force content-type for the request.
2050
+ :type _content_type: str, Optional
2051
+ :param _headers: set to override the headers for a single
2052
+ request; this effectively ignores the headers
2053
+ in the spec for a single request.
2054
+ :type _headers: dict, optional
2055
+ :param _host_index: set to override the host_index for a single
2056
+ request; this effectively ignores the host_index
2057
+ in the spec for a single request.
2058
+ :type _host_index: int, optional
2059
+ :return: Returns the result object.
2060
+ """ # noqa: E501
2061
+
2062
+ _param = self._reset_embedder_endpoint_logo_serialize(
2063
+ id=id,
2064
+ _request_auth=_request_auth,
2065
+ _content_type=_content_type,
2066
+ _headers=_headers,
2067
+ _host_index=_host_index
2068
+ )
2069
+
2070
+ _response_types_map: Dict[str, Optional[str]] = {
2071
+ '200': None,
2072
+ }
2073
+ response_data = self.api_client.call_api(
2074
+ *_param,
2075
+ _request_timeout=_request_timeout
2076
+ )
2077
+ return response_data.response
2078
+
2079
+
2080
+ def _reset_embedder_endpoint_logo_serialize(
2081
+ self,
2082
+ id,
2083
+ _request_auth,
2084
+ _content_type,
2085
+ _headers,
2086
+ _host_index,
2087
+ ) -> RequestSerialized:
2088
+
2089
+ _host = None
2090
+
2091
+ _collection_formats: Dict[str, str] = {
2092
+ }
2093
+
2094
+ _path_params: Dict[str, str] = {}
2095
+ _query_params: List[Tuple[str, str]] = []
2096
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2097
+ _form_params: List[Tuple[str, str]] = []
2098
+ _files: Dict[
2099
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2100
+ ] = {}
2101
+ _body_params: Optional[bytes] = None
2102
+
2103
+ # process the path parameters
2104
+ if id is not None:
2105
+ _path_params['id'] = id
2106
+ # process the query parameters
2107
+ # process the header parameters
2108
+ # process the form parameters
2109
+ # process the body parameter
2110
+
2111
+
2112
+
2113
+
2114
+ # authentication setting
2115
+ _auth_settings: List[str] = [
2116
+ 'QAnswer-Api-Key',
2117
+ 'Bearer'
2118
+ ]
2119
+
2120
+ return self.api_client.param_serialize(
2121
+ method='POST',
2122
+ resource_path='/api/tool/embedder/{id}/logo/reset',
2123
+ path_params=_path_params,
2124
+ query_params=_query_params,
2125
+ header_params=_header_params,
2126
+ body=_body_params,
2127
+ post_params=_form_params,
2128
+ files=_files,
2129
+ auth_settings=_auth_settings,
2130
+ collection_formats=_collection_formats,
2131
+ _host=_host,
2132
+ _request_auth=_request_auth
2133
+ )
2134
+
2135
+
2136
+
2137
+
2138
+ @validate_call
2139
+ def search2(
2140
+ self,
2141
+ filter: LlmFilterDto,
2142
+ _request_timeout: Union[
2143
+ None,
2144
+ Annotated[StrictFloat, Field(gt=0)],
2145
+ Tuple[
2146
+ Annotated[StrictFloat, Field(gt=0)],
2147
+ Annotated[StrictFloat, Field(gt=0)]
2148
+ ]
2149
+ ] = None,
2150
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2151
+ _content_type: Optional[StrictStr] = None,
2152
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2153
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2154
+ ) -> EmbedderListDto:
2155
+ """Search over all embedders that returns detailed information. This is only available for admins.
2156
+
2157
+
2158
+ :param filter: (required)
2159
+ :type filter: LlmFilterDto
2160
+ :param _request_timeout: timeout setting for this request. If one
2161
+ number provided, it will be total request
2162
+ timeout. It can also be a pair (tuple) of
2163
+ (connection, read) timeouts.
2164
+ :type _request_timeout: int, tuple(int, int), optional
2165
+ :param _request_auth: set to override the auth_settings for an a single
2166
+ request; this effectively ignores the
2167
+ authentication in the spec for a single request.
2168
+ :type _request_auth: dict, optional
2169
+ :param _content_type: force content-type for the request.
2170
+ :type _content_type: str, Optional
2171
+ :param _headers: set to override the headers for a single
2172
+ request; this effectively ignores the headers
2173
+ in the spec for a single request.
2174
+ :type _headers: dict, optional
2175
+ :param _host_index: set to override the host_index for a single
2176
+ request; this effectively ignores the host_index
2177
+ in the spec for a single request.
2178
+ :type _host_index: int, optional
2179
+ :return: Returns the result object.
2180
+ """ # noqa: E501
2181
+
2182
+ _param = self._search2_serialize(
2183
+ filter=filter,
2184
+ _request_auth=_request_auth,
2185
+ _content_type=_content_type,
2186
+ _headers=_headers,
2187
+ _host_index=_host_index
2188
+ )
2189
+
2190
+ _response_types_map: Dict[str, Optional[str]] = {
2191
+ '200': "EmbedderListDto",
2192
+ }
2193
+ response_data = self.api_client.call_api(
2194
+ *_param,
2195
+ _request_timeout=_request_timeout
2196
+ )
2197
+ response_data.read()
2198
+ return self.api_client.response_deserialize(
2199
+ response_data=response_data,
2200
+ response_types_map=_response_types_map,
2201
+ ).data
2202
+
2203
+
2204
+ @validate_call
2205
+ def search2_with_http_info(
2206
+ self,
2207
+ filter: LlmFilterDto,
2208
+ _request_timeout: Union[
2209
+ None,
2210
+ Annotated[StrictFloat, Field(gt=0)],
2211
+ Tuple[
2212
+ Annotated[StrictFloat, Field(gt=0)],
2213
+ Annotated[StrictFloat, Field(gt=0)]
2214
+ ]
2215
+ ] = None,
2216
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2217
+ _content_type: Optional[StrictStr] = None,
2218
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2219
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2220
+ ) -> ApiResponse[EmbedderListDto]:
2221
+ """Search over all embedders that returns detailed information. This is only available for admins.
2222
+
2223
+
2224
+ :param filter: (required)
2225
+ :type filter: LlmFilterDto
2226
+ :param _request_timeout: timeout setting for this request. If one
2227
+ number provided, it will be total request
2228
+ timeout. It can also be a pair (tuple) of
2229
+ (connection, read) timeouts.
2230
+ :type _request_timeout: int, tuple(int, int), optional
2231
+ :param _request_auth: set to override the auth_settings for an a single
2232
+ request; this effectively ignores the
2233
+ authentication in the spec for a single request.
2234
+ :type _request_auth: dict, optional
2235
+ :param _content_type: force content-type for the request.
2236
+ :type _content_type: str, Optional
2237
+ :param _headers: set to override the headers for a single
2238
+ request; this effectively ignores the headers
2239
+ in the spec for a single request.
2240
+ :type _headers: dict, optional
2241
+ :param _host_index: set to override the host_index for a single
2242
+ request; this effectively ignores the host_index
2243
+ in the spec for a single request.
2244
+ :type _host_index: int, optional
2245
+ :return: Returns the result object.
2246
+ """ # noqa: E501
2247
+
2248
+ _param = self._search2_serialize(
2249
+ filter=filter,
2250
+ _request_auth=_request_auth,
2251
+ _content_type=_content_type,
2252
+ _headers=_headers,
2253
+ _host_index=_host_index
2254
+ )
2255
+
2256
+ _response_types_map: Dict[str, Optional[str]] = {
2257
+ '200': "EmbedderListDto",
2258
+ }
2259
+ response_data = self.api_client.call_api(
2260
+ *_param,
2261
+ _request_timeout=_request_timeout
2262
+ )
2263
+ response_data.read()
2264
+ return self.api_client.response_deserialize(
2265
+ response_data=response_data,
2266
+ response_types_map=_response_types_map,
2267
+ )
2268
+
2269
+
2270
+ @validate_call
2271
+ def search2_without_preload_content(
2272
+ self,
2273
+ filter: LlmFilterDto,
2274
+ _request_timeout: Union[
2275
+ None,
2276
+ Annotated[StrictFloat, Field(gt=0)],
2277
+ Tuple[
2278
+ Annotated[StrictFloat, Field(gt=0)],
2279
+ Annotated[StrictFloat, Field(gt=0)]
2280
+ ]
2281
+ ] = None,
2282
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2283
+ _content_type: Optional[StrictStr] = None,
2284
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2285
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2286
+ ) -> RESTResponseType:
2287
+ """Search over all embedders that returns detailed information. This is only available for admins.
2288
+
2289
+
2290
+ :param filter: (required)
2291
+ :type filter: LlmFilterDto
2292
+ :param _request_timeout: timeout setting for this request. If one
2293
+ number provided, it will be total request
2294
+ timeout. It can also be a pair (tuple) of
2295
+ (connection, read) timeouts.
2296
+ :type _request_timeout: int, tuple(int, int), optional
2297
+ :param _request_auth: set to override the auth_settings for an a single
2298
+ request; this effectively ignores the
2299
+ authentication in the spec for a single request.
2300
+ :type _request_auth: dict, optional
2301
+ :param _content_type: force content-type for the request.
2302
+ :type _content_type: str, Optional
2303
+ :param _headers: set to override the headers for a single
2304
+ request; this effectively ignores the headers
2305
+ in the spec for a single request.
2306
+ :type _headers: dict, optional
2307
+ :param _host_index: set to override the host_index for a single
2308
+ request; this effectively ignores the host_index
2309
+ in the spec for a single request.
2310
+ :type _host_index: int, optional
2311
+ :return: Returns the result object.
2312
+ """ # noqa: E501
2313
+
2314
+ _param = self._search2_serialize(
2315
+ filter=filter,
2316
+ _request_auth=_request_auth,
2317
+ _content_type=_content_type,
2318
+ _headers=_headers,
2319
+ _host_index=_host_index
2320
+ )
2321
+
2322
+ _response_types_map: Dict[str, Optional[str]] = {
2323
+ '200': "EmbedderListDto",
2324
+ }
2325
+ response_data = self.api_client.call_api(
2326
+ *_param,
2327
+ _request_timeout=_request_timeout
2328
+ )
2329
+ return response_data.response
2330
+
2331
+
2332
+ def _search2_serialize(
2333
+ self,
2334
+ filter,
2335
+ _request_auth,
2336
+ _content_type,
2337
+ _headers,
2338
+ _host_index,
2339
+ ) -> RequestSerialized:
2340
+
2341
+ _host = None
2342
+
2343
+ _collection_formats: Dict[str, str] = {
2344
+ }
2345
+
2346
+ _path_params: Dict[str, str] = {}
2347
+ _query_params: List[Tuple[str, str]] = []
2348
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2349
+ _form_params: List[Tuple[str, str]] = []
2350
+ _files: Dict[
2351
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2352
+ ] = {}
2353
+ _body_params: Optional[bytes] = None
2354
+
2355
+ # process the path parameters
2356
+ # process the query parameters
2357
+ if filter is not None:
2358
+
2359
+ _query_params.append(('filter', filter))
2360
+
2361
+ # process the header parameters
2362
+ # process the form parameters
2363
+ # process the body parameter
2364
+
2365
+
2366
+ # set the HTTP header `Accept`
2367
+ if 'Accept' not in _header_params:
2368
+ _header_params['Accept'] = self.api_client.select_header_accept(
2369
+ [
2370
+ '*/*'
2371
+ ]
2372
+ )
2373
+
2374
+
2375
+ # authentication setting
2376
+ _auth_settings: List[str] = [
2377
+ 'QAnswer-Api-Key',
2378
+ 'Bearer'
2379
+ ]
2380
+
2381
+ return self.api_client.param_serialize(
2382
+ method='GET',
2383
+ resource_path='/api/tool/embedder/search',
2384
+ path_params=_path_params,
2385
+ query_params=_query_params,
2386
+ header_params=_header_params,
2387
+ body=_body_params,
2388
+ post_params=_form_params,
2389
+ files=_files,
2390
+ auth_settings=_auth_settings,
2391
+ collection_formats=_collection_formats,
2392
+ _host=_host,
2393
+ _request_auth=_request_auth
2394
+ )
2395
+
2396
+
2397
+
2398
+
2399
+ @validate_call
2400
+ def search_detailed1(
2401
+ self,
2402
+ filter: LlmFilterDto,
2403
+ _request_timeout: Union[
2404
+ None,
2405
+ Annotated[StrictFloat, Field(gt=0)],
2406
+ Tuple[
2407
+ Annotated[StrictFloat, Field(gt=0)],
2408
+ Annotated[StrictFloat, Field(gt=0)]
2409
+ ]
2410
+ ] = None,
2411
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2412
+ _content_type: Optional[StrictStr] = None,
2413
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2414
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2415
+ ) -> List[EmbedderDetailedDto]:
2416
+ """Search over the embedder endpoints
2417
+
2418
+
2419
+ :param filter: (required)
2420
+ :type filter: LlmFilterDto
2421
+ :param _request_timeout: timeout setting for this request. If one
2422
+ number provided, it will be total request
2423
+ timeout. It can also be a pair (tuple) of
2424
+ (connection, read) timeouts.
2425
+ :type _request_timeout: int, tuple(int, int), optional
2426
+ :param _request_auth: set to override the auth_settings for an a single
2427
+ request; this effectively ignores the
2428
+ authentication in the spec for a single request.
2429
+ :type _request_auth: dict, optional
2430
+ :param _content_type: force content-type for the request.
2431
+ :type _content_type: str, Optional
2432
+ :param _headers: set to override the headers for a single
2433
+ request; this effectively ignores the headers
2434
+ in the spec for a single request.
2435
+ :type _headers: dict, optional
2436
+ :param _host_index: set to override the host_index for a single
2437
+ request; this effectively ignores the host_index
2438
+ in the spec for a single request.
2439
+ :type _host_index: int, optional
2440
+ :return: Returns the result object.
2441
+ """ # noqa: E501
2442
+
2443
+ _param = self._search_detailed1_serialize(
2444
+ filter=filter,
2445
+ _request_auth=_request_auth,
2446
+ _content_type=_content_type,
2447
+ _headers=_headers,
2448
+ _host_index=_host_index
2449
+ )
2450
+
2451
+ _response_types_map: Dict[str, Optional[str]] = {
2452
+ '200': "List[EmbedderDetailedDto]",
2453
+ }
2454
+ response_data = self.api_client.call_api(
2455
+ *_param,
2456
+ _request_timeout=_request_timeout
2457
+ )
2458
+ response_data.read()
2459
+ return self.api_client.response_deserialize(
2460
+ response_data=response_data,
2461
+ response_types_map=_response_types_map,
2462
+ ).data
2463
+
2464
+
2465
+ @validate_call
2466
+ def search_detailed1_with_http_info(
2467
+ self,
2468
+ filter: LlmFilterDto,
2469
+ _request_timeout: Union[
2470
+ None,
2471
+ Annotated[StrictFloat, Field(gt=0)],
2472
+ Tuple[
2473
+ Annotated[StrictFloat, Field(gt=0)],
2474
+ Annotated[StrictFloat, Field(gt=0)]
2475
+ ]
2476
+ ] = None,
2477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2478
+ _content_type: Optional[StrictStr] = None,
2479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2481
+ ) -> ApiResponse[List[EmbedderDetailedDto]]:
2482
+ """Search over the embedder endpoints
2483
+
2484
+
2485
+ :param filter: (required)
2486
+ :type filter: LlmFilterDto
2487
+ :param _request_timeout: timeout setting for this request. If one
2488
+ number provided, it will be total request
2489
+ timeout. It can also be a pair (tuple) of
2490
+ (connection, read) timeouts.
2491
+ :type _request_timeout: int, tuple(int, int), optional
2492
+ :param _request_auth: set to override the auth_settings for an a single
2493
+ request; this effectively ignores the
2494
+ authentication in the spec for a single request.
2495
+ :type _request_auth: dict, optional
2496
+ :param _content_type: force content-type for the request.
2497
+ :type _content_type: str, Optional
2498
+ :param _headers: set to override the headers for a single
2499
+ request; this effectively ignores the headers
2500
+ in the spec for a single request.
2501
+ :type _headers: dict, optional
2502
+ :param _host_index: set to override the host_index for a single
2503
+ request; this effectively ignores the host_index
2504
+ in the spec for a single request.
2505
+ :type _host_index: int, optional
2506
+ :return: Returns the result object.
2507
+ """ # noqa: E501
2508
+
2509
+ _param = self._search_detailed1_serialize(
2510
+ filter=filter,
2511
+ _request_auth=_request_auth,
2512
+ _content_type=_content_type,
2513
+ _headers=_headers,
2514
+ _host_index=_host_index
2515
+ )
2516
+
2517
+ _response_types_map: Dict[str, Optional[str]] = {
2518
+ '200': "List[EmbedderDetailedDto]",
2519
+ }
2520
+ response_data = self.api_client.call_api(
2521
+ *_param,
2522
+ _request_timeout=_request_timeout
2523
+ )
2524
+ response_data.read()
2525
+ return self.api_client.response_deserialize(
2526
+ response_data=response_data,
2527
+ response_types_map=_response_types_map,
2528
+ )
2529
+
2530
+
2531
+ @validate_call
2532
+ def search_detailed1_without_preload_content(
2533
+ self,
2534
+ filter: LlmFilterDto,
2535
+ _request_timeout: Union[
2536
+ None,
2537
+ Annotated[StrictFloat, Field(gt=0)],
2538
+ Tuple[
2539
+ Annotated[StrictFloat, Field(gt=0)],
2540
+ Annotated[StrictFloat, Field(gt=0)]
2541
+ ]
2542
+ ] = None,
2543
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2544
+ _content_type: Optional[StrictStr] = None,
2545
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2546
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2547
+ ) -> RESTResponseType:
2548
+ """Search over the embedder endpoints
2549
+
2550
+
2551
+ :param filter: (required)
2552
+ :type filter: LlmFilterDto
2553
+ :param _request_timeout: timeout setting for this request. If one
2554
+ number provided, it will be total request
2555
+ timeout. It can also be a pair (tuple) of
2556
+ (connection, read) timeouts.
2557
+ :type _request_timeout: int, tuple(int, int), optional
2558
+ :param _request_auth: set to override the auth_settings for an a single
2559
+ request; this effectively ignores the
2560
+ authentication in the spec for a single request.
2561
+ :type _request_auth: dict, optional
2562
+ :param _content_type: force content-type for the request.
2563
+ :type _content_type: str, Optional
2564
+ :param _headers: set to override the headers for a single
2565
+ request; this effectively ignores the headers
2566
+ in the spec for a single request.
2567
+ :type _headers: dict, optional
2568
+ :param _host_index: set to override the host_index for a single
2569
+ request; this effectively ignores the host_index
2570
+ in the spec for a single request.
2571
+ :type _host_index: int, optional
2572
+ :return: Returns the result object.
2573
+ """ # noqa: E501
2574
+
2575
+ _param = self._search_detailed1_serialize(
2576
+ filter=filter,
2577
+ _request_auth=_request_auth,
2578
+ _content_type=_content_type,
2579
+ _headers=_headers,
2580
+ _host_index=_host_index
2581
+ )
2582
+
2583
+ _response_types_map: Dict[str, Optional[str]] = {
2584
+ '200': "List[EmbedderDetailedDto]",
2585
+ }
2586
+ response_data = self.api_client.call_api(
2587
+ *_param,
2588
+ _request_timeout=_request_timeout
2589
+ )
2590
+ return response_data.response
2591
+
2592
+
2593
+ def _search_detailed1_serialize(
2594
+ self,
2595
+ filter,
2596
+ _request_auth,
2597
+ _content_type,
2598
+ _headers,
2599
+ _host_index,
2600
+ ) -> RequestSerialized:
2601
+
2602
+ _host = None
2603
+
2604
+ _collection_formats: Dict[str, str] = {
2605
+ }
2606
+
2607
+ _path_params: Dict[str, str] = {}
2608
+ _query_params: List[Tuple[str, str]] = []
2609
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2610
+ _form_params: List[Tuple[str, str]] = []
2611
+ _files: Dict[
2612
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2613
+ ] = {}
2614
+ _body_params: Optional[bytes] = None
2615
+
2616
+ # process the path parameters
2617
+ # process the query parameters
2618
+ if filter is not None:
2619
+
2620
+ _query_params.append(('filter', filter))
2621
+
2622
+ # process the header parameters
2623
+ # process the form parameters
2624
+ # process the body parameter
2625
+
2626
+
2627
+ # set the HTTP header `Accept`
2628
+ if 'Accept' not in _header_params:
2629
+ _header_params['Accept'] = self.api_client.select_header_accept(
2630
+ [
2631
+ '*/*'
2632
+ ]
2633
+ )
2634
+
2635
+
2636
+ # authentication setting
2637
+ _auth_settings: List[str] = [
2638
+ 'QAnswer-Api-Key',
2639
+ 'Bearer'
2640
+ ]
2641
+
2642
+ return self.api_client.param_serialize(
2643
+ method='GET',
2644
+ resource_path='/api/tool/embedder/search-detailed',
2645
+ path_params=_path_params,
2646
+ query_params=_query_params,
2647
+ header_params=_header_params,
2648
+ body=_body_params,
2649
+ post_params=_form_params,
2650
+ files=_files,
2651
+ auth_settings=_auth_settings,
2652
+ collection_formats=_collection_formats,
2653
+ _host=_host,
2654
+ _request_auth=_request_auth
2655
+ )
2656
+
2657
+
2658
+
2659
+
2660
+ @validate_call
2661
+ def set_default_embedder_endpoint(
2662
+ self,
2663
+ embedder_id: StrictInt,
2664
+ organization_id: Optional[StrictInt] = None,
2665
+ _request_timeout: Union[
2666
+ None,
2667
+ Annotated[StrictFloat, Field(gt=0)],
2668
+ Tuple[
2669
+ Annotated[StrictFloat, Field(gt=0)],
2670
+ Annotated[StrictFloat, Field(gt=0)]
2671
+ ]
2672
+ ] = None,
2673
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2674
+ _content_type: Optional[StrictStr] = None,
2675
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2676
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2677
+ ) -> None:
2678
+ """Sets the default embedder endpoint
2679
+
2680
+
2681
+ :param embedder_id: (required)
2682
+ :type embedder_id: int
2683
+ :param organization_id:
2684
+ :type organization_id: int
2685
+ :param _request_timeout: timeout setting for this request. If one
2686
+ number provided, it will be total request
2687
+ timeout. It can also be a pair (tuple) of
2688
+ (connection, read) timeouts.
2689
+ :type _request_timeout: int, tuple(int, int), optional
2690
+ :param _request_auth: set to override the auth_settings for an a single
2691
+ request; this effectively ignores the
2692
+ authentication in the spec for a single request.
2693
+ :type _request_auth: dict, optional
2694
+ :param _content_type: force content-type for the request.
2695
+ :type _content_type: str, Optional
2696
+ :param _headers: set to override the headers for a single
2697
+ request; this effectively ignores the headers
2698
+ in the spec for a single request.
2699
+ :type _headers: dict, optional
2700
+ :param _host_index: set to override the host_index for a single
2701
+ request; this effectively ignores the host_index
2702
+ in the spec for a single request.
2703
+ :type _host_index: int, optional
2704
+ :return: Returns the result object.
2705
+ """ # noqa: E501
2706
+
2707
+ _param = self._set_default_embedder_endpoint_serialize(
2708
+ embedder_id=embedder_id,
2709
+ organization_id=organization_id,
2710
+ _request_auth=_request_auth,
2711
+ _content_type=_content_type,
2712
+ _headers=_headers,
2713
+ _host_index=_host_index
2714
+ )
2715
+
2716
+ _response_types_map: Dict[str, Optional[str]] = {
2717
+ '200': None,
2718
+ }
2719
+ response_data = self.api_client.call_api(
2720
+ *_param,
2721
+ _request_timeout=_request_timeout
2722
+ )
2723
+ response_data.read()
2724
+ return self.api_client.response_deserialize(
2725
+ response_data=response_data,
2726
+ response_types_map=_response_types_map,
2727
+ ).data
2728
+
2729
+
2730
+ @validate_call
2731
+ def set_default_embedder_endpoint_with_http_info(
2732
+ self,
2733
+ embedder_id: StrictInt,
2734
+ organization_id: Optional[StrictInt] = None,
2735
+ _request_timeout: Union[
2736
+ None,
2737
+ Annotated[StrictFloat, Field(gt=0)],
2738
+ Tuple[
2739
+ Annotated[StrictFloat, Field(gt=0)],
2740
+ Annotated[StrictFloat, Field(gt=0)]
2741
+ ]
2742
+ ] = None,
2743
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2744
+ _content_type: Optional[StrictStr] = None,
2745
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2746
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2747
+ ) -> ApiResponse[None]:
2748
+ """Sets the default embedder endpoint
2749
+
2750
+
2751
+ :param embedder_id: (required)
2752
+ :type embedder_id: int
2753
+ :param organization_id:
2754
+ :type organization_id: int
2755
+ :param _request_timeout: timeout setting for this request. If one
2756
+ number provided, it will be total request
2757
+ timeout. It can also be a pair (tuple) of
2758
+ (connection, read) timeouts.
2759
+ :type _request_timeout: int, tuple(int, int), optional
2760
+ :param _request_auth: set to override the auth_settings for an a single
2761
+ request; this effectively ignores the
2762
+ authentication in the spec for a single request.
2763
+ :type _request_auth: dict, optional
2764
+ :param _content_type: force content-type for the request.
2765
+ :type _content_type: str, Optional
2766
+ :param _headers: set to override the headers for a single
2767
+ request; this effectively ignores the headers
2768
+ in the spec for a single request.
2769
+ :type _headers: dict, optional
2770
+ :param _host_index: set to override the host_index for a single
2771
+ request; this effectively ignores the host_index
2772
+ in the spec for a single request.
2773
+ :type _host_index: int, optional
2774
+ :return: Returns the result object.
2775
+ """ # noqa: E501
2776
+
2777
+ _param = self._set_default_embedder_endpoint_serialize(
2778
+ embedder_id=embedder_id,
2779
+ organization_id=organization_id,
2780
+ _request_auth=_request_auth,
2781
+ _content_type=_content_type,
2782
+ _headers=_headers,
2783
+ _host_index=_host_index
2784
+ )
2785
+
2786
+ _response_types_map: Dict[str, Optional[str]] = {
2787
+ '200': None,
2788
+ }
2789
+ response_data = self.api_client.call_api(
2790
+ *_param,
2791
+ _request_timeout=_request_timeout
2792
+ )
2793
+ response_data.read()
2794
+ return self.api_client.response_deserialize(
2795
+ response_data=response_data,
2796
+ response_types_map=_response_types_map,
2797
+ )
2798
+
2799
+
2800
+ @validate_call
2801
+ def set_default_embedder_endpoint_without_preload_content(
2802
+ self,
2803
+ embedder_id: StrictInt,
2804
+ organization_id: Optional[StrictInt] = None,
2805
+ _request_timeout: Union[
2806
+ None,
2807
+ Annotated[StrictFloat, Field(gt=0)],
2808
+ Tuple[
2809
+ Annotated[StrictFloat, Field(gt=0)],
2810
+ Annotated[StrictFloat, Field(gt=0)]
2811
+ ]
2812
+ ] = None,
2813
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2814
+ _content_type: Optional[StrictStr] = None,
2815
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2816
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2817
+ ) -> RESTResponseType:
2818
+ """Sets the default embedder endpoint
2819
+
2820
+
2821
+ :param embedder_id: (required)
2822
+ :type embedder_id: int
2823
+ :param organization_id:
2824
+ :type organization_id: int
2825
+ :param _request_timeout: timeout setting for this request. If one
2826
+ number provided, it will be total request
2827
+ timeout. It can also be a pair (tuple) of
2828
+ (connection, read) timeouts.
2829
+ :type _request_timeout: int, tuple(int, int), optional
2830
+ :param _request_auth: set to override the auth_settings for an a single
2831
+ request; this effectively ignores the
2832
+ authentication in the spec for a single request.
2833
+ :type _request_auth: dict, optional
2834
+ :param _content_type: force content-type for the request.
2835
+ :type _content_type: str, Optional
2836
+ :param _headers: set to override the headers for a single
2837
+ request; this effectively ignores the headers
2838
+ in the spec for a single request.
2839
+ :type _headers: dict, optional
2840
+ :param _host_index: set to override the host_index for a single
2841
+ request; this effectively ignores the host_index
2842
+ in the spec for a single request.
2843
+ :type _host_index: int, optional
2844
+ :return: Returns the result object.
2845
+ """ # noqa: E501
2846
+
2847
+ _param = self._set_default_embedder_endpoint_serialize(
2848
+ embedder_id=embedder_id,
2849
+ organization_id=organization_id,
2850
+ _request_auth=_request_auth,
2851
+ _content_type=_content_type,
2852
+ _headers=_headers,
2853
+ _host_index=_host_index
2854
+ )
2855
+
2856
+ _response_types_map: Dict[str, Optional[str]] = {
2857
+ '200': None,
2858
+ }
2859
+ response_data = self.api_client.call_api(
2860
+ *_param,
2861
+ _request_timeout=_request_timeout
2862
+ )
2863
+ return response_data.response
2864
+
2865
+
2866
+ def _set_default_embedder_endpoint_serialize(
2867
+ self,
2868
+ embedder_id,
2869
+ organization_id,
2870
+ _request_auth,
2871
+ _content_type,
2872
+ _headers,
2873
+ _host_index,
2874
+ ) -> RequestSerialized:
2875
+
2876
+ _host = None
2877
+
2878
+ _collection_formats: Dict[str, str] = {
2879
+ }
2880
+
2881
+ _path_params: Dict[str, str] = {}
2882
+ _query_params: List[Tuple[str, str]] = []
2883
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2884
+ _form_params: List[Tuple[str, str]] = []
2885
+ _files: Dict[
2886
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2887
+ ] = {}
2888
+ _body_params: Optional[bytes] = None
2889
+
2890
+ # process the path parameters
2891
+ # process the query parameters
2892
+ if embedder_id is not None:
2893
+
2894
+ _query_params.append(('embedder_id', embedder_id))
2895
+
2896
+ if organization_id is not None:
2897
+
2898
+ _query_params.append(('organization_id', organization_id))
2899
+
2900
+ # process the header parameters
2901
+ # process the form parameters
2902
+ # process the body parameter
2903
+
2904
+
2905
+
2906
+
2907
+ # authentication setting
2908
+ _auth_settings: List[str] = [
2909
+ 'QAnswer-Api-Key',
2910
+ 'Bearer'
2911
+ ]
2912
+
2913
+ return self.api_client.param_serialize(
2914
+ method='PUT',
2915
+ resource_path='/api/tool/embedder/default',
2916
+ path_params=_path_params,
2917
+ query_params=_query_params,
2918
+ header_params=_header_params,
2919
+ body=_body_params,
2920
+ post_params=_form_params,
2921
+ files=_files,
2922
+ auth_settings=_auth_settings,
2923
+ collection_formats=_collection_formats,
2924
+ _host=_host,
2925
+ _request_auth=_request_auth
2926
+ )
2927
+
2928
+
2929
+
2930
+
2931
+ @validate_call
2932
+ def set_embedder_endpoint_logo(
2933
+ self,
2934
+ id: StrictInt,
2935
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
2936
+ _request_timeout: Union[
2937
+ None,
2938
+ Annotated[StrictFloat, Field(gt=0)],
2939
+ Tuple[
2940
+ Annotated[StrictFloat, Field(gt=0)],
2941
+ Annotated[StrictFloat, Field(gt=0)]
2942
+ ]
2943
+ ] = None,
2944
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2945
+ _content_type: Optional[StrictStr] = None,
2946
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2947
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2948
+ ) -> None:
2949
+ """Set the logo of an embedder endpoint by id
2950
+
2951
+
2952
+ :param id: (required)
2953
+ :type id: int
2954
+ :param file: (required)
2955
+ :type file: bytearray
2956
+ :param _request_timeout: timeout setting for this request. If one
2957
+ number provided, it will be total request
2958
+ timeout. It can also be a pair (tuple) of
2959
+ (connection, read) timeouts.
2960
+ :type _request_timeout: int, tuple(int, int), optional
2961
+ :param _request_auth: set to override the auth_settings for an a single
2962
+ request; this effectively ignores the
2963
+ authentication in the spec for a single request.
2964
+ :type _request_auth: dict, optional
2965
+ :param _content_type: force content-type for the request.
2966
+ :type _content_type: str, Optional
2967
+ :param _headers: set to override the headers for a single
2968
+ request; this effectively ignores the headers
2969
+ in the spec for a single request.
2970
+ :type _headers: dict, optional
2971
+ :param _host_index: set to override the host_index for a single
2972
+ request; this effectively ignores the host_index
2973
+ in the spec for a single request.
2974
+ :type _host_index: int, optional
2975
+ :return: Returns the result object.
2976
+ """ # noqa: E501
2977
+
2978
+ _param = self._set_embedder_endpoint_logo_serialize(
2979
+ id=id,
2980
+ file=file,
2981
+ _request_auth=_request_auth,
2982
+ _content_type=_content_type,
2983
+ _headers=_headers,
2984
+ _host_index=_host_index
2985
+ )
2986
+
2987
+ _response_types_map: Dict[str, Optional[str]] = {
2988
+ '200': None,
2989
+ }
2990
+ response_data = self.api_client.call_api(
2991
+ *_param,
2992
+ _request_timeout=_request_timeout
2993
+ )
2994
+ response_data.read()
2995
+ return self.api_client.response_deserialize(
2996
+ response_data=response_data,
2997
+ response_types_map=_response_types_map,
2998
+ ).data
2999
+
3000
+
3001
+ @validate_call
3002
+ def set_embedder_endpoint_logo_with_http_info(
3003
+ self,
3004
+ id: StrictInt,
3005
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3006
+ _request_timeout: Union[
3007
+ None,
3008
+ Annotated[StrictFloat, Field(gt=0)],
3009
+ Tuple[
3010
+ Annotated[StrictFloat, Field(gt=0)],
3011
+ Annotated[StrictFloat, Field(gt=0)]
3012
+ ]
3013
+ ] = None,
3014
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3015
+ _content_type: Optional[StrictStr] = None,
3016
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3017
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3018
+ ) -> ApiResponse[None]:
3019
+ """Set the logo of an embedder endpoint by id
3020
+
3021
+
3022
+ :param id: (required)
3023
+ :type id: int
3024
+ :param file: (required)
3025
+ :type file: bytearray
3026
+ :param _request_timeout: timeout setting for this request. If one
3027
+ number provided, it will be total request
3028
+ timeout. It can also be a pair (tuple) of
3029
+ (connection, read) timeouts.
3030
+ :type _request_timeout: int, tuple(int, int), optional
3031
+ :param _request_auth: set to override the auth_settings for an a single
3032
+ request; this effectively ignores the
3033
+ authentication in the spec for a single request.
3034
+ :type _request_auth: dict, optional
3035
+ :param _content_type: force content-type for the request.
3036
+ :type _content_type: str, Optional
3037
+ :param _headers: set to override the headers for a single
3038
+ request; this effectively ignores the headers
3039
+ in the spec for a single request.
3040
+ :type _headers: dict, optional
3041
+ :param _host_index: set to override the host_index for a single
3042
+ request; this effectively ignores the host_index
3043
+ in the spec for a single request.
3044
+ :type _host_index: int, optional
3045
+ :return: Returns the result object.
3046
+ """ # noqa: E501
3047
+
3048
+ _param = self._set_embedder_endpoint_logo_serialize(
3049
+ id=id,
3050
+ file=file,
3051
+ _request_auth=_request_auth,
3052
+ _content_type=_content_type,
3053
+ _headers=_headers,
3054
+ _host_index=_host_index
3055
+ )
3056
+
3057
+ _response_types_map: Dict[str, Optional[str]] = {
3058
+ '200': None,
3059
+ }
3060
+ response_data = self.api_client.call_api(
3061
+ *_param,
3062
+ _request_timeout=_request_timeout
3063
+ )
3064
+ response_data.read()
3065
+ return self.api_client.response_deserialize(
3066
+ response_data=response_data,
3067
+ response_types_map=_response_types_map,
3068
+ )
3069
+
3070
+
3071
+ @validate_call
3072
+ def set_embedder_endpoint_logo_without_preload_content(
3073
+ self,
3074
+ id: StrictInt,
3075
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3076
+ _request_timeout: Union[
3077
+ None,
3078
+ Annotated[StrictFloat, Field(gt=0)],
3079
+ Tuple[
3080
+ Annotated[StrictFloat, Field(gt=0)],
3081
+ Annotated[StrictFloat, Field(gt=0)]
3082
+ ]
3083
+ ] = None,
3084
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3085
+ _content_type: Optional[StrictStr] = None,
3086
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3087
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3088
+ ) -> RESTResponseType:
3089
+ """Set the logo of an embedder endpoint by id
3090
+
3091
+
3092
+ :param id: (required)
3093
+ :type id: int
3094
+ :param file: (required)
3095
+ :type file: bytearray
3096
+ :param _request_timeout: timeout setting for this request. If one
3097
+ number provided, it will be total request
3098
+ timeout. It can also be a pair (tuple) of
3099
+ (connection, read) timeouts.
3100
+ :type _request_timeout: int, tuple(int, int), optional
3101
+ :param _request_auth: set to override the auth_settings for an a single
3102
+ request; this effectively ignores the
3103
+ authentication in the spec for a single request.
3104
+ :type _request_auth: dict, optional
3105
+ :param _content_type: force content-type for the request.
3106
+ :type _content_type: str, Optional
3107
+ :param _headers: set to override the headers for a single
3108
+ request; this effectively ignores the headers
3109
+ in the spec for a single request.
3110
+ :type _headers: dict, optional
3111
+ :param _host_index: set to override the host_index for a single
3112
+ request; this effectively ignores the host_index
3113
+ in the spec for a single request.
3114
+ :type _host_index: int, optional
3115
+ :return: Returns the result object.
3116
+ """ # noqa: E501
3117
+
3118
+ _param = self._set_embedder_endpoint_logo_serialize(
3119
+ id=id,
3120
+ file=file,
3121
+ _request_auth=_request_auth,
3122
+ _content_type=_content_type,
3123
+ _headers=_headers,
3124
+ _host_index=_host_index
3125
+ )
3126
+
3127
+ _response_types_map: Dict[str, Optional[str]] = {
3128
+ '200': None,
3129
+ }
3130
+ response_data = self.api_client.call_api(
3131
+ *_param,
3132
+ _request_timeout=_request_timeout
3133
+ )
3134
+ return response_data.response
3135
+
3136
+
3137
+ def _set_embedder_endpoint_logo_serialize(
3138
+ self,
3139
+ id,
3140
+ file,
3141
+ _request_auth,
3142
+ _content_type,
3143
+ _headers,
3144
+ _host_index,
3145
+ ) -> RequestSerialized:
3146
+
3147
+ _host = None
3148
+
3149
+ _collection_formats: Dict[str, str] = {
3150
+ }
3151
+
3152
+ _path_params: Dict[str, str] = {}
3153
+ _query_params: List[Tuple[str, str]] = []
3154
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3155
+ _form_params: List[Tuple[str, str]] = []
3156
+ _files: Dict[
3157
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3158
+ ] = {}
3159
+ _body_params: Optional[bytes] = None
3160
+
3161
+ # process the path parameters
3162
+ if id is not None:
3163
+ _path_params['id'] = id
3164
+ # process the query parameters
3165
+ # process the header parameters
3166
+ # process the form parameters
3167
+ if file is not None:
3168
+ _files['file'] = file
3169
+ # process the body parameter
3170
+
3171
+
3172
+
3173
+ # set the HTTP header `Content-Type`
3174
+ if _content_type:
3175
+ _header_params['Content-Type'] = _content_type
3176
+ else:
3177
+ _default_content_type = (
3178
+ self.api_client.select_header_content_type(
3179
+ [
3180
+ 'multipart/form-data'
3181
+ ]
3182
+ )
3183
+ )
3184
+ if _default_content_type is not None:
3185
+ _header_params['Content-Type'] = _default_content_type
3186
+
3187
+ # authentication setting
3188
+ _auth_settings: List[str] = [
3189
+ 'QAnswer-Api-Key',
3190
+ 'Bearer'
3191
+ ]
3192
+
3193
+ return self.api_client.param_serialize(
3194
+ method='POST',
3195
+ resource_path='/api/tool/embedder/{id}/logo',
3196
+ path_params=_path_params,
3197
+ query_params=_query_params,
3198
+ header_params=_header_params,
3199
+ body=_body_params,
3200
+ post_params=_form_params,
3201
+ files=_files,
3202
+ auth_settings=_auth_settings,
3203
+ collection_formats=_collection_formats,
3204
+ _host=_host,
3205
+ _request_auth=_request_auth
3206
+ )
3207
+
3208
+
3209
+
3210
+
3211
+ @validate_call
3212
+ def set_is_active1(
3213
+ self,
3214
+ id: StrictInt,
3215
+ active: StrictBool,
3216
+ organization_id: Optional[StrictInt] = None,
3217
+ _request_timeout: Union[
3218
+ None,
3219
+ Annotated[StrictFloat, Field(gt=0)],
3220
+ Tuple[
3221
+ Annotated[StrictFloat, Field(gt=0)],
3222
+ Annotated[StrictFloat, Field(gt=0)]
3223
+ ]
3224
+ ] = None,
3225
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3226
+ _content_type: Optional[StrictStr] = None,
3227
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3228
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3229
+ ) -> None:
3230
+ """Sets if the LLM endpoint is active. If the organization ID is provided, it sets if the endpoint is active for that organization otherwise for the whole application.
3231
+
3232
+
3233
+ :param id: (required)
3234
+ :type id: int
3235
+ :param active: (required)
3236
+ :type active: bool
3237
+ :param organization_id:
3238
+ :type organization_id: int
3239
+ :param _request_timeout: timeout setting for this request. If one
3240
+ number provided, it will be total request
3241
+ timeout. It can also be a pair (tuple) of
3242
+ (connection, read) timeouts.
3243
+ :type _request_timeout: int, tuple(int, int), optional
3244
+ :param _request_auth: set to override the auth_settings for an a single
3245
+ request; this effectively ignores the
3246
+ authentication in the spec for a single request.
3247
+ :type _request_auth: dict, optional
3248
+ :param _content_type: force content-type for the request.
3249
+ :type _content_type: str, Optional
3250
+ :param _headers: set to override the headers for a single
3251
+ request; this effectively ignores the headers
3252
+ in the spec for a single request.
3253
+ :type _headers: dict, optional
3254
+ :param _host_index: set to override the host_index for a single
3255
+ request; this effectively ignores the host_index
3256
+ in the spec for a single request.
3257
+ :type _host_index: int, optional
3258
+ :return: Returns the result object.
3259
+ """ # noqa: E501
3260
+
3261
+ _param = self._set_is_active1_serialize(
3262
+ id=id,
3263
+ active=active,
3264
+ organization_id=organization_id,
3265
+ _request_auth=_request_auth,
3266
+ _content_type=_content_type,
3267
+ _headers=_headers,
3268
+ _host_index=_host_index
3269
+ )
3270
+
3271
+ _response_types_map: Dict[str, Optional[str]] = {
3272
+ '200': None,
3273
+ }
3274
+ response_data = self.api_client.call_api(
3275
+ *_param,
3276
+ _request_timeout=_request_timeout
3277
+ )
3278
+ response_data.read()
3279
+ return self.api_client.response_deserialize(
3280
+ response_data=response_data,
3281
+ response_types_map=_response_types_map,
3282
+ ).data
3283
+
3284
+
3285
+ @validate_call
3286
+ def set_is_active1_with_http_info(
3287
+ self,
3288
+ id: StrictInt,
3289
+ active: StrictBool,
3290
+ organization_id: Optional[StrictInt] = None,
3291
+ _request_timeout: Union[
3292
+ None,
3293
+ Annotated[StrictFloat, Field(gt=0)],
3294
+ Tuple[
3295
+ Annotated[StrictFloat, Field(gt=0)],
3296
+ Annotated[StrictFloat, Field(gt=0)]
3297
+ ]
3298
+ ] = None,
3299
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3300
+ _content_type: Optional[StrictStr] = None,
3301
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3302
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3303
+ ) -> ApiResponse[None]:
3304
+ """Sets if the LLM endpoint is active. If the organization ID is provided, it sets if the endpoint is active for that organization otherwise for the whole application.
3305
+
3306
+
3307
+ :param id: (required)
3308
+ :type id: int
3309
+ :param active: (required)
3310
+ :type active: bool
3311
+ :param organization_id:
3312
+ :type organization_id: int
3313
+ :param _request_timeout: timeout setting for this request. If one
3314
+ number provided, it will be total request
3315
+ timeout. It can also be a pair (tuple) of
3316
+ (connection, read) timeouts.
3317
+ :type _request_timeout: int, tuple(int, int), optional
3318
+ :param _request_auth: set to override the auth_settings for an a single
3319
+ request; this effectively ignores the
3320
+ authentication in the spec for a single request.
3321
+ :type _request_auth: dict, optional
3322
+ :param _content_type: force content-type for the request.
3323
+ :type _content_type: str, Optional
3324
+ :param _headers: set to override the headers for a single
3325
+ request; this effectively ignores the headers
3326
+ in the spec for a single request.
3327
+ :type _headers: dict, optional
3328
+ :param _host_index: set to override the host_index for a single
3329
+ request; this effectively ignores the host_index
3330
+ in the spec for a single request.
3331
+ :type _host_index: int, optional
3332
+ :return: Returns the result object.
3333
+ """ # noqa: E501
3334
+
3335
+ _param = self._set_is_active1_serialize(
3336
+ id=id,
3337
+ active=active,
3338
+ organization_id=organization_id,
3339
+ _request_auth=_request_auth,
3340
+ _content_type=_content_type,
3341
+ _headers=_headers,
3342
+ _host_index=_host_index
3343
+ )
3344
+
3345
+ _response_types_map: Dict[str, Optional[str]] = {
3346
+ '200': None,
3347
+ }
3348
+ response_data = self.api_client.call_api(
3349
+ *_param,
3350
+ _request_timeout=_request_timeout
3351
+ )
3352
+ response_data.read()
3353
+ return self.api_client.response_deserialize(
3354
+ response_data=response_data,
3355
+ response_types_map=_response_types_map,
3356
+ )
3357
+
3358
+
3359
+ @validate_call
3360
+ def set_is_active1_without_preload_content(
3361
+ self,
3362
+ id: StrictInt,
3363
+ active: StrictBool,
3364
+ organization_id: Optional[StrictInt] = None,
3365
+ _request_timeout: Union[
3366
+ None,
3367
+ Annotated[StrictFloat, Field(gt=0)],
3368
+ Tuple[
3369
+ Annotated[StrictFloat, Field(gt=0)],
3370
+ Annotated[StrictFloat, Field(gt=0)]
3371
+ ]
3372
+ ] = None,
3373
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3374
+ _content_type: Optional[StrictStr] = None,
3375
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3376
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3377
+ ) -> RESTResponseType:
3378
+ """Sets if the LLM endpoint is active. If the organization ID is provided, it sets if the endpoint is active for that organization otherwise for the whole application.
3379
+
3380
+
3381
+ :param id: (required)
3382
+ :type id: int
3383
+ :param active: (required)
3384
+ :type active: bool
3385
+ :param organization_id:
3386
+ :type organization_id: int
3387
+ :param _request_timeout: timeout setting for this request. If one
3388
+ number provided, it will be total request
3389
+ timeout. It can also be a pair (tuple) of
3390
+ (connection, read) timeouts.
3391
+ :type _request_timeout: int, tuple(int, int), optional
3392
+ :param _request_auth: set to override the auth_settings for an a single
3393
+ request; this effectively ignores the
3394
+ authentication in the spec for a single request.
3395
+ :type _request_auth: dict, optional
3396
+ :param _content_type: force content-type for the request.
3397
+ :type _content_type: str, Optional
3398
+ :param _headers: set to override the headers for a single
3399
+ request; this effectively ignores the headers
3400
+ in the spec for a single request.
3401
+ :type _headers: dict, optional
3402
+ :param _host_index: set to override the host_index for a single
3403
+ request; this effectively ignores the host_index
3404
+ in the spec for a single request.
3405
+ :type _host_index: int, optional
3406
+ :return: Returns the result object.
3407
+ """ # noqa: E501
3408
+
3409
+ _param = self._set_is_active1_serialize(
3410
+ id=id,
3411
+ active=active,
3412
+ organization_id=organization_id,
3413
+ _request_auth=_request_auth,
3414
+ _content_type=_content_type,
3415
+ _headers=_headers,
3416
+ _host_index=_host_index
3417
+ )
3418
+
3419
+ _response_types_map: Dict[str, Optional[str]] = {
3420
+ '200': None,
3421
+ }
3422
+ response_data = self.api_client.call_api(
3423
+ *_param,
3424
+ _request_timeout=_request_timeout
3425
+ )
3426
+ return response_data.response
3427
+
3428
+
3429
+ def _set_is_active1_serialize(
3430
+ self,
3431
+ id,
3432
+ active,
3433
+ organization_id,
3434
+ _request_auth,
3435
+ _content_type,
3436
+ _headers,
3437
+ _host_index,
3438
+ ) -> RequestSerialized:
3439
+
3440
+ _host = None
3441
+
3442
+ _collection_formats: Dict[str, str] = {
3443
+ }
3444
+
3445
+ _path_params: Dict[str, str] = {}
3446
+ _query_params: List[Tuple[str, str]] = []
3447
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3448
+ _form_params: List[Tuple[str, str]] = []
3449
+ _files: Dict[
3450
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3451
+ ] = {}
3452
+ _body_params: Optional[bytes] = None
3453
+
3454
+ # process the path parameters
3455
+ if id is not None:
3456
+ _path_params['id'] = id
3457
+ # process the query parameters
3458
+ if organization_id is not None:
3459
+
3460
+ _query_params.append(('organizationId', organization_id))
3461
+
3462
+ if active is not None:
3463
+
3464
+ _query_params.append(('active', active))
3465
+
3466
+ # process the header parameters
3467
+ # process the form parameters
3468
+ # process the body parameter
3469
+
3470
+
3471
+
3472
+
3473
+ # authentication setting
3474
+ _auth_settings: List[str] = [
3475
+ 'QAnswer-Api-Key',
3476
+ 'Bearer'
3477
+ ]
3478
+
3479
+ return self.api_client.param_serialize(
3480
+ method='POST',
3481
+ resource_path='/api/tool/embedder/{id}/active',
3482
+ path_params=_path_params,
3483
+ query_params=_query_params,
3484
+ header_params=_header_params,
3485
+ body=_body_params,
3486
+ post_params=_form_params,
3487
+ files=_files,
3488
+ auth_settings=_auth_settings,
3489
+ collection_formats=_collection_formats,
3490
+ _host=_host,
3491
+ _request_auth=_request_auth
3492
+ )
3493
+
3494
+
3495
+
3496
+
3497
+ @validate_call
3498
+ def update_embedder_endpoint(
3499
+ self,
3500
+ id: StrictInt,
3501
+ embedding_endpoint_update: EmbeddingEndpointUpdate,
3502
+ _request_timeout: Union[
3503
+ None,
3504
+ Annotated[StrictFloat, Field(gt=0)],
3505
+ Tuple[
3506
+ Annotated[StrictFloat, Field(gt=0)],
3507
+ Annotated[StrictFloat, Field(gt=0)]
3508
+ ]
3509
+ ] = None,
3510
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3511
+ _content_type: Optional[StrictStr] = None,
3512
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3513
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3514
+ ) -> EmbedderDetailedDto:
3515
+ """Update an embedder endpoint
3516
+
3517
+
3518
+ :param id: (required)
3519
+ :type id: int
3520
+ :param embedding_endpoint_update: (required)
3521
+ :type embedding_endpoint_update: EmbeddingEndpointUpdate
3522
+ :param _request_timeout: timeout setting for this request. If one
3523
+ number provided, it will be total request
3524
+ timeout. It can also be a pair (tuple) of
3525
+ (connection, read) timeouts.
3526
+ :type _request_timeout: int, tuple(int, int), optional
3527
+ :param _request_auth: set to override the auth_settings for an a single
3528
+ request; this effectively ignores the
3529
+ authentication in the spec for a single request.
3530
+ :type _request_auth: dict, optional
3531
+ :param _content_type: force content-type for the request.
3532
+ :type _content_type: str, Optional
3533
+ :param _headers: set to override the headers for a single
3534
+ request; this effectively ignores the headers
3535
+ in the spec for a single request.
3536
+ :type _headers: dict, optional
3537
+ :param _host_index: set to override the host_index for a single
3538
+ request; this effectively ignores the host_index
3539
+ in the spec for a single request.
3540
+ :type _host_index: int, optional
3541
+ :return: Returns the result object.
3542
+ """ # noqa: E501
3543
+
3544
+ _param = self._update_embedder_endpoint_serialize(
3545
+ id=id,
3546
+ embedding_endpoint_update=embedding_endpoint_update,
3547
+ _request_auth=_request_auth,
3548
+ _content_type=_content_type,
3549
+ _headers=_headers,
3550
+ _host_index=_host_index
3551
+ )
3552
+
3553
+ _response_types_map: Dict[str, Optional[str]] = {
3554
+ '200': "EmbedderDetailedDto",
3555
+ }
3556
+ response_data = self.api_client.call_api(
3557
+ *_param,
3558
+ _request_timeout=_request_timeout
3559
+ )
3560
+ response_data.read()
3561
+ return self.api_client.response_deserialize(
3562
+ response_data=response_data,
3563
+ response_types_map=_response_types_map,
3564
+ ).data
3565
+
3566
+
3567
+ @validate_call
3568
+ def update_embedder_endpoint_with_http_info(
3569
+ self,
3570
+ id: StrictInt,
3571
+ embedding_endpoint_update: EmbeddingEndpointUpdate,
3572
+ _request_timeout: Union[
3573
+ None,
3574
+ Annotated[StrictFloat, Field(gt=0)],
3575
+ Tuple[
3576
+ Annotated[StrictFloat, Field(gt=0)],
3577
+ Annotated[StrictFloat, Field(gt=0)]
3578
+ ]
3579
+ ] = None,
3580
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3581
+ _content_type: Optional[StrictStr] = None,
3582
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3583
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3584
+ ) -> ApiResponse[EmbedderDetailedDto]:
3585
+ """Update an embedder endpoint
3586
+
3587
+
3588
+ :param id: (required)
3589
+ :type id: int
3590
+ :param embedding_endpoint_update: (required)
3591
+ :type embedding_endpoint_update: EmbeddingEndpointUpdate
3592
+ :param _request_timeout: timeout setting for this request. If one
3593
+ number provided, it will be total request
3594
+ timeout. It can also be a pair (tuple) of
3595
+ (connection, read) timeouts.
3596
+ :type _request_timeout: int, tuple(int, int), optional
3597
+ :param _request_auth: set to override the auth_settings for an a single
3598
+ request; this effectively ignores the
3599
+ authentication in the spec for a single request.
3600
+ :type _request_auth: dict, optional
3601
+ :param _content_type: force content-type for the request.
3602
+ :type _content_type: str, Optional
3603
+ :param _headers: set to override the headers for a single
3604
+ request; this effectively ignores the headers
3605
+ in the spec for a single request.
3606
+ :type _headers: dict, optional
3607
+ :param _host_index: set to override the host_index for a single
3608
+ request; this effectively ignores the host_index
3609
+ in the spec for a single request.
3610
+ :type _host_index: int, optional
3611
+ :return: Returns the result object.
3612
+ """ # noqa: E501
3613
+
3614
+ _param = self._update_embedder_endpoint_serialize(
3615
+ id=id,
3616
+ embedding_endpoint_update=embedding_endpoint_update,
3617
+ _request_auth=_request_auth,
3618
+ _content_type=_content_type,
3619
+ _headers=_headers,
3620
+ _host_index=_host_index
3621
+ )
3622
+
3623
+ _response_types_map: Dict[str, Optional[str]] = {
3624
+ '200': "EmbedderDetailedDto",
3625
+ }
3626
+ response_data = self.api_client.call_api(
3627
+ *_param,
3628
+ _request_timeout=_request_timeout
3629
+ )
3630
+ response_data.read()
3631
+ return self.api_client.response_deserialize(
3632
+ response_data=response_data,
3633
+ response_types_map=_response_types_map,
3634
+ )
3635
+
3636
+
3637
+ @validate_call
3638
+ def update_embedder_endpoint_without_preload_content(
3639
+ self,
3640
+ id: StrictInt,
3641
+ embedding_endpoint_update: EmbeddingEndpointUpdate,
3642
+ _request_timeout: Union[
3643
+ None,
3644
+ Annotated[StrictFloat, Field(gt=0)],
3645
+ Tuple[
3646
+ Annotated[StrictFloat, Field(gt=0)],
3647
+ Annotated[StrictFloat, Field(gt=0)]
3648
+ ]
3649
+ ] = None,
3650
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3651
+ _content_type: Optional[StrictStr] = None,
3652
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3653
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3654
+ ) -> RESTResponseType:
3655
+ """Update an embedder endpoint
3656
+
3657
+
3658
+ :param id: (required)
3659
+ :type id: int
3660
+ :param embedding_endpoint_update: (required)
3661
+ :type embedding_endpoint_update: EmbeddingEndpointUpdate
3662
+ :param _request_timeout: timeout setting for this request. If one
3663
+ number provided, it will be total request
3664
+ timeout. It can also be a pair (tuple) of
3665
+ (connection, read) timeouts.
3666
+ :type _request_timeout: int, tuple(int, int), optional
3667
+ :param _request_auth: set to override the auth_settings for an a single
3668
+ request; this effectively ignores the
3669
+ authentication in the spec for a single request.
3670
+ :type _request_auth: dict, optional
3671
+ :param _content_type: force content-type for the request.
3672
+ :type _content_type: str, Optional
3673
+ :param _headers: set to override the headers for a single
3674
+ request; this effectively ignores the headers
3675
+ in the spec for a single request.
3676
+ :type _headers: dict, optional
3677
+ :param _host_index: set to override the host_index for a single
3678
+ request; this effectively ignores the host_index
3679
+ in the spec for a single request.
3680
+ :type _host_index: int, optional
3681
+ :return: Returns the result object.
3682
+ """ # noqa: E501
3683
+
3684
+ _param = self._update_embedder_endpoint_serialize(
3685
+ id=id,
3686
+ embedding_endpoint_update=embedding_endpoint_update,
3687
+ _request_auth=_request_auth,
3688
+ _content_type=_content_type,
3689
+ _headers=_headers,
3690
+ _host_index=_host_index
3691
+ )
3692
+
3693
+ _response_types_map: Dict[str, Optional[str]] = {
3694
+ '200': "EmbedderDetailedDto",
3695
+ }
3696
+ response_data = self.api_client.call_api(
3697
+ *_param,
3698
+ _request_timeout=_request_timeout
3699
+ )
3700
+ return response_data.response
3701
+
3702
+
3703
+ def _update_embedder_endpoint_serialize(
3704
+ self,
3705
+ id,
3706
+ embedding_endpoint_update,
3707
+ _request_auth,
3708
+ _content_type,
3709
+ _headers,
3710
+ _host_index,
3711
+ ) -> RequestSerialized:
3712
+
3713
+ _host = None
3714
+
3715
+ _collection_formats: Dict[str, str] = {
3716
+ }
3717
+
3718
+ _path_params: Dict[str, str] = {}
3719
+ _query_params: List[Tuple[str, str]] = []
3720
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3721
+ _form_params: List[Tuple[str, str]] = []
3722
+ _files: Dict[
3723
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3724
+ ] = {}
3725
+ _body_params: Optional[bytes] = None
3726
+
3727
+ # process the path parameters
3728
+ if id is not None:
3729
+ _path_params['id'] = id
3730
+ # process the query parameters
3731
+ # process the header parameters
3732
+ # process the form parameters
3733
+ # process the body parameter
3734
+ if embedding_endpoint_update is not None:
3735
+ _body_params = embedding_endpoint_update
3736
+
3737
+
3738
+ # set the HTTP header `Accept`
3739
+ if 'Accept' not in _header_params:
3740
+ _header_params['Accept'] = self.api_client.select_header_accept(
3741
+ [
3742
+ '*/*'
3743
+ ]
3744
+ )
3745
+
3746
+ # set the HTTP header `Content-Type`
3747
+ if _content_type:
3748
+ _header_params['Content-Type'] = _content_type
3749
+ else:
3750
+ _default_content_type = (
3751
+ self.api_client.select_header_content_type(
3752
+ [
3753
+ 'application/json'
3754
+ ]
3755
+ )
3756
+ )
3757
+ if _default_content_type is not None:
3758
+ _header_params['Content-Type'] = _default_content_type
3759
+
3760
+ # authentication setting
3761
+ _auth_settings: List[str] = [
3762
+ 'QAnswer-Api-Key',
3763
+ 'Bearer'
3764
+ ]
3765
+
3766
+ return self.api_client.param_serialize(
3767
+ method='PUT',
3768
+ resource_path='/api/tool/embedder/{id}',
3769
+ path_params=_path_params,
3770
+ query_params=_query_params,
3771
+ header_params=_header_params,
3772
+ body=_body_params,
3773
+ post_params=_form_params,
3774
+ files=_files,
3775
+ auth_settings=_auth_settings,
3776
+ collection_formats=_collection_formats,
3777
+ _host=_host,
3778
+ _request_auth=_request_auth
3779
+ )
3780
+
3781
+
3782
+
3783
+
3784
+ @validate_call
3785
+ def validate_embedder_endpoint_by_id(
3786
+ self,
3787
+ id: StrictInt,
3788
+ _request_timeout: Union[
3789
+ None,
3790
+ Annotated[StrictFloat, Field(gt=0)],
3791
+ Tuple[
3792
+ Annotated[StrictFloat, Field(gt=0)],
3793
+ Annotated[StrictFloat, Field(gt=0)]
3794
+ ]
3795
+ ] = None,
3796
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3797
+ _content_type: Optional[StrictStr] = None,
3798
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3799
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3800
+ ) -> EmbeddingEndpointValidationResponse:
3801
+ """Validate an embedder endpoint by id
3802
+
3803
+
3804
+ :param id: (required)
3805
+ :type id: int
3806
+ :param _request_timeout: timeout setting for this request. If one
3807
+ number provided, it will be total request
3808
+ timeout. It can also be a pair (tuple) of
3809
+ (connection, read) timeouts.
3810
+ :type _request_timeout: int, tuple(int, int), optional
3811
+ :param _request_auth: set to override the auth_settings for an a single
3812
+ request; this effectively ignores the
3813
+ authentication in the spec for a single request.
3814
+ :type _request_auth: dict, optional
3815
+ :param _content_type: force content-type for the request.
3816
+ :type _content_type: str, Optional
3817
+ :param _headers: set to override the headers for a single
3818
+ request; this effectively ignores the headers
3819
+ in the spec for a single request.
3820
+ :type _headers: dict, optional
3821
+ :param _host_index: set to override the host_index for a single
3822
+ request; this effectively ignores the host_index
3823
+ in the spec for a single request.
3824
+ :type _host_index: int, optional
3825
+ :return: Returns the result object.
3826
+ """ # noqa: E501
3827
+
3828
+ _param = self._validate_embedder_endpoint_by_id_serialize(
3829
+ id=id,
3830
+ _request_auth=_request_auth,
3831
+ _content_type=_content_type,
3832
+ _headers=_headers,
3833
+ _host_index=_host_index
3834
+ )
3835
+
3836
+ _response_types_map: Dict[str, Optional[str]] = {
3837
+ '200': "EmbeddingEndpointValidationResponse",
3838
+ }
3839
+ response_data = self.api_client.call_api(
3840
+ *_param,
3841
+ _request_timeout=_request_timeout
3842
+ )
3843
+ response_data.read()
3844
+ return self.api_client.response_deserialize(
3845
+ response_data=response_data,
3846
+ response_types_map=_response_types_map,
3847
+ ).data
3848
+
3849
+
3850
+ @validate_call
3851
+ def validate_embedder_endpoint_by_id_with_http_info(
3852
+ self,
3853
+ id: StrictInt,
3854
+ _request_timeout: Union[
3855
+ None,
3856
+ Annotated[StrictFloat, Field(gt=0)],
3857
+ Tuple[
3858
+ Annotated[StrictFloat, Field(gt=0)],
3859
+ Annotated[StrictFloat, Field(gt=0)]
3860
+ ]
3861
+ ] = None,
3862
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3863
+ _content_type: Optional[StrictStr] = None,
3864
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3865
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3866
+ ) -> ApiResponse[EmbeddingEndpointValidationResponse]:
3867
+ """Validate an embedder endpoint by id
3868
+
3869
+
3870
+ :param id: (required)
3871
+ :type id: int
3872
+ :param _request_timeout: timeout setting for this request. If one
3873
+ number provided, it will be total request
3874
+ timeout. It can also be a pair (tuple) of
3875
+ (connection, read) timeouts.
3876
+ :type _request_timeout: int, tuple(int, int), optional
3877
+ :param _request_auth: set to override the auth_settings for an a single
3878
+ request; this effectively ignores the
3879
+ authentication in the spec for a single request.
3880
+ :type _request_auth: dict, optional
3881
+ :param _content_type: force content-type for the request.
3882
+ :type _content_type: str, Optional
3883
+ :param _headers: set to override the headers for a single
3884
+ request; this effectively ignores the headers
3885
+ in the spec for a single request.
3886
+ :type _headers: dict, optional
3887
+ :param _host_index: set to override the host_index for a single
3888
+ request; this effectively ignores the host_index
3889
+ in the spec for a single request.
3890
+ :type _host_index: int, optional
3891
+ :return: Returns the result object.
3892
+ """ # noqa: E501
3893
+
3894
+ _param = self._validate_embedder_endpoint_by_id_serialize(
3895
+ id=id,
3896
+ _request_auth=_request_auth,
3897
+ _content_type=_content_type,
3898
+ _headers=_headers,
3899
+ _host_index=_host_index
3900
+ )
3901
+
3902
+ _response_types_map: Dict[str, Optional[str]] = {
3903
+ '200': "EmbeddingEndpointValidationResponse",
3904
+ }
3905
+ response_data = self.api_client.call_api(
3906
+ *_param,
3907
+ _request_timeout=_request_timeout
3908
+ )
3909
+ response_data.read()
3910
+ return self.api_client.response_deserialize(
3911
+ response_data=response_data,
3912
+ response_types_map=_response_types_map,
3913
+ )
3914
+
3915
+
3916
+ @validate_call
3917
+ def validate_embedder_endpoint_by_id_without_preload_content(
3918
+ self,
3919
+ id: StrictInt,
3920
+ _request_timeout: Union[
3921
+ None,
3922
+ Annotated[StrictFloat, Field(gt=0)],
3923
+ Tuple[
3924
+ Annotated[StrictFloat, Field(gt=0)],
3925
+ Annotated[StrictFloat, Field(gt=0)]
3926
+ ]
3927
+ ] = None,
3928
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3929
+ _content_type: Optional[StrictStr] = None,
3930
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3931
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3932
+ ) -> RESTResponseType:
3933
+ """Validate an embedder endpoint by id
3934
+
3935
+
3936
+ :param id: (required)
3937
+ :type id: int
3938
+ :param _request_timeout: timeout setting for this request. If one
3939
+ number provided, it will be total request
3940
+ timeout. It can also be a pair (tuple) of
3941
+ (connection, read) timeouts.
3942
+ :type _request_timeout: int, tuple(int, int), optional
3943
+ :param _request_auth: set to override the auth_settings for an a single
3944
+ request; this effectively ignores the
3945
+ authentication in the spec for a single request.
3946
+ :type _request_auth: dict, optional
3947
+ :param _content_type: force content-type for the request.
3948
+ :type _content_type: str, Optional
3949
+ :param _headers: set to override the headers for a single
3950
+ request; this effectively ignores the headers
3951
+ in the spec for a single request.
3952
+ :type _headers: dict, optional
3953
+ :param _host_index: set to override the host_index for a single
3954
+ request; this effectively ignores the host_index
3955
+ in the spec for a single request.
3956
+ :type _host_index: int, optional
3957
+ :return: Returns the result object.
3958
+ """ # noqa: E501
3959
+
3960
+ _param = self._validate_embedder_endpoint_by_id_serialize(
3961
+ id=id,
3962
+ _request_auth=_request_auth,
3963
+ _content_type=_content_type,
3964
+ _headers=_headers,
3965
+ _host_index=_host_index
3966
+ )
3967
+
3968
+ _response_types_map: Dict[str, Optional[str]] = {
3969
+ '200': "EmbeddingEndpointValidationResponse",
3970
+ }
3971
+ response_data = self.api_client.call_api(
3972
+ *_param,
3973
+ _request_timeout=_request_timeout
3974
+ )
3975
+ return response_data.response
3976
+
3977
+
3978
+ def _validate_embedder_endpoint_by_id_serialize(
3979
+ self,
3980
+ id,
3981
+ _request_auth,
3982
+ _content_type,
3983
+ _headers,
3984
+ _host_index,
3985
+ ) -> RequestSerialized:
3986
+
3987
+ _host = None
3988
+
3989
+ _collection_formats: Dict[str, str] = {
3990
+ }
3991
+
3992
+ _path_params: Dict[str, str] = {}
3993
+ _query_params: List[Tuple[str, str]] = []
3994
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3995
+ _form_params: List[Tuple[str, str]] = []
3996
+ _files: Dict[
3997
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3998
+ ] = {}
3999
+ _body_params: Optional[bytes] = None
4000
+
4001
+ # process the path parameters
4002
+ if id is not None:
4003
+ _path_params['id'] = id
4004
+ # process the query parameters
4005
+ # process the header parameters
4006
+ # process the form parameters
4007
+ # process the body parameter
4008
+
4009
+
4010
+ # set the HTTP header `Accept`
4011
+ if 'Accept' not in _header_params:
4012
+ _header_params['Accept'] = self.api_client.select_header_accept(
4013
+ [
4014
+ '*/*'
4015
+ ]
4016
+ )
4017
+
4018
+
4019
+ # authentication setting
4020
+ _auth_settings: List[str] = [
4021
+ 'QAnswer-Api-Key',
4022
+ 'Bearer'
4023
+ ]
4024
+
4025
+ return self.api_client.param_serialize(
4026
+ method='POST',
4027
+ resource_path='/api/tool/embedder/validate/{id}',
4028
+ path_params=_path_params,
4029
+ query_params=_query_params,
4030
+ header_params=_header_params,
4031
+ body=_body_params,
4032
+ post_params=_form_params,
4033
+ files=_files,
4034
+ auth_settings=_auth_settings,
4035
+ collection_formats=_collection_formats,
4036
+ _host=_host,
4037
+ _request_auth=_request_auth
4038
+ )
4039
+
4040
+