smallestai 2.2.0__py3-none-any.whl → 3.0.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.

Potentially problematic release.


This version of smallestai might be problematic. Click here for more details.

Files changed (95) hide show
  1. smallestai/__init__.py +95 -0
  2. smallestai/atoms/__init__.py +182 -0
  3. smallestai/atoms/api/__init__.py +12 -0
  4. smallestai/atoms/api/agent_templates_api.py +573 -0
  5. smallestai/atoms/api/agents_api.py +1465 -0
  6. smallestai/atoms/api/calls_api.py +320 -0
  7. smallestai/atoms/api/campaigns_api.py +1689 -0
  8. smallestai/atoms/api/knowledge_base_api.py +2271 -0
  9. smallestai/atoms/api/logs_api.py +305 -0
  10. smallestai/atoms/api/organization_api.py +285 -0
  11. smallestai/atoms/api/user_api.py +285 -0
  12. smallestai/atoms/api_client.py +797 -0
  13. smallestai/atoms/api_response.py +21 -0
  14. smallestai/atoms/atoms_client.py +560 -0
  15. smallestai/atoms/configuration.py +582 -0
  16. smallestai/atoms/exceptions.py +216 -0
  17. smallestai/atoms/models/__init__.py +72 -0
  18. smallestai/atoms/models/agent_dto.py +130 -0
  19. smallestai/atoms/models/agent_dto_language.py +91 -0
  20. smallestai/atoms/models/agent_dto_synthesizer.py +99 -0
  21. smallestai/atoms/models/agent_dto_synthesizer_voice_config.py +111 -0
  22. smallestai/atoms/models/api_response.py +89 -0
  23. smallestai/atoms/models/bad_request_error_response.py +89 -0
  24. smallestai/atoms/models/create_agent_from_template200_response.py +89 -0
  25. smallestai/atoms/models/create_agent_from_template_request.py +91 -0
  26. smallestai/atoms/models/create_agent_request.py +113 -0
  27. smallestai/atoms/models/create_agent_request_language.py +124 -0
  28. smallestai/atoms/models/create_agent_request_language_synthesizer.py +110 -0
  29. smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +137 -0
  30. smallestai/atoms/models/create_campaign200_response.py +93 -0
  31. smallestai/atoms/models/create_campaign200_response_data.py +106 -0
  32. smallestai/atoms/models/create_campaign200_response_inner.py +106 -0
  33. smallestai/atoms/models/create_campaign201_response.py +93 -0
  34. smallestai/atoms/models/create_campaign201_response_data.py +104 -0
  35. smallestai/atoms/models/create_campaign_request.py +93 -0
  36. smallestai/atoms/models/create_knowledge_base201_response.py +89 -0
  37. smallestai/atoms/models/create_knowledge_base_request.py +89 -0
  38. smallestai/atoms/models/delete_agent200_response.py +87 -0
  39. smallestai/atoms/models/get_agent_by_id200_response.py +93 -0
  40. smallestai/atoms/models/get_agent_templates200_response.py +97 -0
  41. smallestai/atoms/models/get_agent_templates200_response_data_inner.py +97 -0
  42. smallestai/atoms/models/get_agents200_response.py +93 -0
  43. smallestai/atoms/models/get_agents200_response_data.py +101 -0
  44. smallestai/atoms/models/get_campaign_by_id200_response.py +93 -0
  45. smallestai/atoms/models/get_campaign_by_id200_response_data.py +114 -0
  46. smallestai/atoms/models/get_campaigns200_response.py +97 -0
  47. smallestai/atoms/models/get_campaigns200_response_data_inner.py +118 -0
  48. smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py +89 -0
  49. smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py +89 -0
  50. smallestai/atoms/models/get_campaigns_request.py +89 -0
  51. smallestai/atoms/models/get_conversation200_response.py +93 -0
  52. smallestai/atoms/models/get_conversation200_response_data.py +125 -0
  53. smallestai/atoms/models/get_conversation_logs200_response.py +93 -0
  54. smallestai/atoms/models/get_conversation_logs200_response_data.py +125 -0
  55. smallestai/atoms/models/get_current_user200_response.py +93 -0
  56. smallestai/atoms/models/get_current_user200_response_data.py +99 -0
  57. smallestai/atoms/models/get_knowledge_base_by_id200_response.py +93 -0
  58. smallestai/atoms/models/get_knowledge_base_items200_response.py +97 -0
  59. smallestai/atoms/models/get_knowledge_bases200_response.py +97 -0
  60. smallestai/atoms/models/get_organization200_response.py +93 -0
  61. smallestai/atoms/models/get_organization200_response_data.py +105 -0
  62. smallestai/atoms/models/get_organization200_response_data_members_inner.py +89 -0
  63. smallestai/atoms/models/get_organization200_response_data_subscription.py +87 -0
  64. smallestai/atoms/models/internal_server_error_response.py +89 -0
  65. smallestai/atoms/models/knowledge_base_dto.py +93 -0
  66. smallestai/atoms/models/knowledge_base_item_dto.py +124 -0
  67. smallestai/atoms/models/start_outbound_call200_response.py +93 -0
  68. smallestai/atoms/models/start_outbound_call200_response_data.py +87 -0
  69. smallestai/atoms/models/start_outbound_call_request.py +89 -0
  70. smallestai/atoms/models/unauthorized_error_reponse.py +89 -0
  71. smallestai/atoms/models/update_agent200_response.py +89 -0
  72. smallestai/atoms/models/update_agent_request.py +119 -0
  73. smallestai/atoms/models/update_agent_request_language.py +99 -0
  74. smallestai/atoms/models/update_agent_request_synthesizer.py +110 -0
  75. smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py +137 -0
  76. smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py +111 -0
  77. smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py +99 -0
  78. smallestai/atoms/models/upload_text_to_knowledge_base_request.py +89 -0
  79. smallestai/atoms/py.typed +0 -0
  80. smallestai/atoms/rest.py +258 -0
  81. smallestai/waves/__init__.py +5 -0
  82. smallest/async_tts.py → smallestai/waves/async_waves_client.py +3 -3
  83. {smallest → smallestai/waves}/stream_tts.py +6 -6
  84. {smallest → smallestai/waves}/utils.py +2 -2
  85. smallest/tts.py → smallestai/waves/waves_client.py +3 -3
  86. {smallestai-2.2.0.dist-info → smallestai-3.0.0.dist-info}/METADATA +194 -42
  87. smallestai-3.0.0.dist-info/RECORD +92 -0
  88. {smallestai-2.2.0.dist-info → smallestai-3.0.0.dist-info}/WHEEL +1 -1
  89. smallestai-3.0.0.dist-info/top_level.txt +1 -0
  90. smallest/__init__.py +0 -5
  91. smallestai-2.2.0.dist-info/RECORD +0 -12
  92. smallestai-2.2.0.dist-info/top_level.txt +0 -1
  93. {smallest → smallestai/waves}/exceptions.py +0 -0
  94. {smallest → smallestai/waves}/models.py +0 -0
  95. {smallestai-2.2.0.dist-info → smallestai-3.0.0.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,573 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Management API
5
+
6
+ API for managing agents, their templates, and call logs
7
+
8
+ The version of the OpenAPI document: 1.0.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 smallestai.atoms.models.create_agent_from_template200_response import CreateAgentFromTemplate200Response
20
+ from smallestai.atoms.models.create_agent_from_template_request import CreateAgentFromTemplateRequest
21
+ from smallestai.atoms.models.get_agent_templates200_response import GetAgentTemplates200Response
22
+
23
+ from smallestai.atoms.api_client import ApiClient, RequestSerialized
24
+ from smallestai.atoms.api_response import ApiResponse
25
+ from smallestai.atoms.rest import RESTResponseType
26
+
27
+
28
+ class AgentTemplatesApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+
41
+ @validate_call
42
+ def create_agent_from_template(
43
+ self,
44
+ create_agent_from_template_request: CreateAgentFromTemplateRequest,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Annotated[StrictFloat, Field(gt=0)]
51
+ ]
52
+ ] = None,
53
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
+ _content_type: Optional[StrictStr] = None,
55
+ _headers: Optional[Dict[StrictStr, Any]] = None,
56
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
+ ) -> CreateAgentFromTemplate200Response:
58
+ """Create agent from template
59
+
60
+ We have created templates for some common use cases. You can use these templates to create an agent. For getting list of templates, you can use the /agent/template endpoint. It will give you the list of templates with their description and id. You can pass the id of the template in the request body to create an agent from the template.
61
+
62
+ :param create_agent_from_template_request: (required)
63
+ :type create_agent_from_template_request: CreateAgentFromTemplateRequest
64
+ :param _request_timeout: timeout setting for this request. If one
65
+ number provided, it will be total request
66
+ timeout. It can also be a pair (tuple) of
67
+ (connection, read) timeouts.
68
+ :type _request_timeout: int, tuple(int, int), optional
69
+ :param _request_auth: set to override the auth_settings for an a single
70
+ request; this effectively ignores the
71
+ authentication in the spec for a single request.
72
+ :type _request_auth: dict, optional
73
+ :param _content_type: force content-type for the request.
74
+ :type _content_type: str, Optional
75
+ :param _headers: set to override the headers for a single
76
+ request; this effectively ignores the headers
77
+ in the spec for a single request.
78
+ :type _headers: dict, optional
79
+ :param _host_index: set to override the host_index for a single
80
+ request; this effectively ignores the host_index
81
+ in the spec for a single request.
82
+ :type _host_index: int, optional
83
+ :return: Returns the result object.
84
+ """ # noqa: E501
85
+
86
+ _param = self._create_agent_from_template_serialize(
87
+ create_agent_from_template_request=create_agent_from_template_request,
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index
92
+ )
93
+
94
+ _response_types_map: Dict[str, Optional[str]] = {
95
+ '200': "CreateAgentFromTemplate200Response",
96
+ '400': "BadRequestErrorResponse",
97
+ '401': "UnauthorizedErrorReponse",
98
+ '500': "InternalServerErrorResponse",
99
+ }
100
+ response_data = self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ def create_agent_from_template_with_http_info(
113
+ self,
114
+ create_agent_from_template_request: CreateAgentFromTemplateRequest,
115
+ _request_timeout: Union[
116
+ None,
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Tuple[
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Annotated[StrictFloat, Field(gt=0)]
121
+ ]
122
+ ] = None,
123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
124
+ _content_type: Optional[StrictStr] = None,
125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
+ ) -> ApiResponse[CreateAgentFromTemplate200Response]:
128
+ """Create agent from template
129
+
130
+ We have created templates for some common use cases. You can use these templates to create an agent. For getting list of templates, you can use the /agent/template endpoint. It will give you the list of templates with their description and id. You can pass the id of the template in the request body to create an agent from the template.
131
+
132
+ :param create_agent_from_template_request: (required)
133
+ :type create_agent_from_template_request: CreateAgentFromTemplateRequest
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_agent_from_template_serialize(
157
+ create_agent_from_template_request=create_agent_from_template_request,
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': "CreateAgentFromTemplate200Response",
166
+ '400': "BadRequestErrorResponse",
167
+ '401': "UnauthorizedErrorReponse",
168
+ '500': "InternalServerErrorResponse",
169
+ }
170
+ response_data = self.api_client.call_api(
171
+ *_param,
172
+ _request_timeout=_request_timeout
173
+ )
174
+ response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
179
+
180
+
181
+ @validate_call
182
+ def create_agent_from_template_without_preload_content(
183
+ self,
184
+ create_agent_from_template_request: CreateAgentFromTemplateRequest,
185
+ _request_timeout: Union[
186
+ None,
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Tuple[
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Annotated[StrictFloat, Field(gt=0)]
191
+ ]
192
+ ] = None,
193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
194
+ _content_type: Optional[StrictStr] = None,
195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
197
+ ) -> RESTResponseType:
198
+ """Create agent from template
199
+
200
+ We have created templates for some common use cases. You can use these templates to create an agent. For getting list of templates, you can use the /agent/template endpoint. It will give you the list of templates with their description and id. You can pass the id of the template in the request body to create an agent from the template.
201
+
202
+ :param create_agent_from_template_request: (required)
203
+ :type create_agent_from_template_request: CreateAgentFromTemplateRequest
204
+ :param _request_timeout: timeout setting for this request. If one
205
+ number provided, it will be total request
206
+ timeout. It can also be a pair (tuple) of
207
+ (connection, read) timeouts.
208
+ :type _request_timeout: int, tuple(int, int), optional
209
+ :param _request_auth: set to override the auth_settings for an a single
210
+ request; this effectively ignores the
211
+ authentication in the spec for a single request.
212
+ :type _request_auth: dict, optional
213
+ :param _content_type: force content-type for the request.
214
+ :type _content_type: str, Optional
215
+ :param _headers: set to override the headers for a single
216
+ request; this effectively ignores the headers
217
+ in the spec for a single request.
218
+ :type _headers: dict, optional
219
+ :param _host_index: set to override the host_index for a single
220
+ request; this effectively ignores the host_index
221
+ in the spec for a single request.
222
+ :type _host_index: int, optional
223
+ :return: Returns the result object.
224
+ """ # noqa: E501
225
+
226
+ _param = self._create_agent_from_template_serialize(
227
+ create_agent_from_template_request=create_agent_from_template_request,
228
+ _request_auth=_request_auth,
229
+ _content_type=_content_type,
230
+ _headers=_headers,
231
+ _host_index=_host_index
232
+ )
233
+
234
+ _response_types_map: Dict[str, Optional[str]] = {
235
+ '200': "CreateAgentFromTemplate200Response",
236
+ '400': "BadRequestErrorResponse",
237
+ '401': "UnauthorizedErrorReponse",
238
+ '500': "InternalServerErrorResponse",
239
+ }
240
+ response_data = self.api_client.call_api(
241
+ *_param,
242
+ _request_timeout=_request_timeout
243
+ )
244
+ return response_data.response
245
+
246
+
247
+ def _create_agent_from_template_serialize(
248
+ self,
249
+ create_agent_from_template_request,
250
+ _request_auth,
251
+ _content_type,
252
+ _headers,
253
+ _host_index,
254
+ ) -> RequestSerialized:
255
+
256
+ _host = None
257
+
258
+ _collection_formats: Dict[str, str] = {
259
+ }
260
+
261
+ _path_params: Dict[str, str] = {}
262
+ _query_params: List[Tuple[str, str]] = []
263
+ _header_params: Dict[str, Optional[str]] = _headers or {}
264
+ _form_params: List[Tuple[str, str]] = []
265
+ _files: Dict[
266
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
267
+ ] = {}
268
+ _body_params: Optional[bytes] = None
269
+
270
+ # process the path parameters
271
+ # process the query parameters
272
+ # process the header parameters
273
+ # process the form parameters
274
+ # process the body parameter
275
+ if create_agent_from_template_request is not None:
276
+ _body_params = create_agent_from_template_request
277
+
278
+
279
+ # set the HTTP header `Accept`
280
+ if 'Accept' not in _header_params:
281
+ _header_params['Accept'] = self.api_client.select_header_accept(
282
+ [
283
+ 'application/json'
284
+ ]
285
+ )
286
+
287
+ # set the HTTP header `Content-Type`
288
+ if _content_type:
289
+ _header_params['Content-Type'] = _content_type
290
+ else:
291
+ _default_content_type = (
292
+ self.api_client.select_header_content_type(
293
+ [
294
+ 'application/json'
295
+ ]
296
+ )
297
+ )
298
+ if _default_content_type is not None:
299
+ _header_params['Content-Type'] = _default_content_type
300
+
301
+ # authentication setting
302
+ _auth_settings: List[str] = [
303
+ 'BearerAuth'
304
+ ]
305
+
306
+ return self.api_client.param_serialize(
307
+ method='POST',
308
+ resource_path='/agent/from-template',
309
+ path_params=_path_params,
310
+ query_params=_query_params,
311
+ header_params=_header_params,
312
+ body=_body_params,
313
+ post_params=_form_params,
314
+ files=_files,
315
+ auth_settings=_auth_settings,
316
+ collection_formats=_collection_formats,
317
+ _host=_host,
318
+ _request_auth=_request_auth
319
+ )
320
+
321
+
322
+
323
+
324
+ @validate_call
325
+ def get_agent_templates(
326
+ self,
327
+ _request_timeout: Union[
328
+ None,
329
+ Annotated[StrictFloat, Field(gt=0)],
330
+ Tuple[
331
+ Annotated[StrictFloat, Field(gt=0)],
332
+ Annotated[StrictFloat, Field(gt=0)]
333
+ ]
334
+ ] = None,
335
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
336
+ _content_type: Optional[StrictStr] = None,
337
+ _headers: Optional[Dict[StrictStr, Any]] = None,
338
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
339
+ ) -> GetAgentTemplates200Response:
340
+ """Get agent templates
341
+
342
+
343
+ :param _request_timeout: timeout setting for this request. If one
344
+ number provided, it will be total request
345
+ timeout. It can also be a pair (tuple) of
346
+ (connection, read) timeouts.
347
+ :type _request_timeout: int, tuple(int, int), optional
348
+ :param _request_auth: set to override the auth_settings for an a single
349
+ request; this effectively ignores the
350
+ authentication in the spec for a single request.
351
+ :type _request_auth: dict, optional
352
+ :param _content_type: force content-type for the request.
353
+ :type _content_type: str, Optional
354
+ :param _headers: set to override the headers for a single
355
+ request; this effectively ignores the headers
356
+ in the spec for a single request.
357
+ :type _headers: dict, optional
358
+ :param _host_index: set to override the host_index for a single
359
+ request; this effectively ignores the host_index
360
+ in the spec for a single request.
361
+ :type _host_index: int, optional
362
+ :return: Returns the result object.
363
+ """ # noqa: E501
364
+
365
+ _param = self._get_agent_templates_serialize(
366
+ _request_auth=_request_auth,
367
+ _content_type=_content_type,
368
+ _headers=_headers,
369
+ _host_index=_host_index
370
+ )
371
+
372
+ _response_types_map: Dict[str, Optional[str]] = {
373
+ '200': "GetAgentTemplates200Response",
374
+ '401': "UnauthorizedErrorReponse",
375
+ '400': "BadRequestErrorResponse",
376
+ '500': "InternalServerErrorResponse",
377
+ }
378
+ response_data = self.api_client.call_api(
379
+ *_param,
380
+ _request_timeout=_request_timeout
381
+ )
382
+ response_data.read()
383
+ return self.api_client.response_deserialize(
384
+ response_data=response_data,
385
+ response_types_map=_response_types_map,
386
+ ).data
387
+
388
+
389
+ @validate_call
390
+ def get_agent_templates_with_http_info(
391
+ self,
392
+ _request_timeout: Union[
393
+ None,
394
+ Annotated[StrictFloat, Field(gt=0)],
395
+ Tuple[
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Annotated[StrictFloat, Field(gt=0)]
398
+ ]
399
+ ] = None,
400
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
401
+ _content_type: Optional[StrictStr] = None,
402
+ _headers: Optional[Dict[StrictStr, Any]] = None,
403
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
404
+ ) -> ApiResponse[GetAgentTemplates200Response]:
405
+ """Get agent templates
406
+
407
+
408
+ :param _request_timeout: timeout setting for this request. If one
409
+ number provided, it will be total request
410
+ timeout. It can also be a pair (tuple) of
411
+ (connection, read) timeouts.
412
+ :type _request_timeout: int, tuple(int, int), optional
413
+ :param _request_auth: set to override the auth_settings for an a single
414
+ request; this effectively ignores the
415
+ authentication in the spec for a single request.
416
+ :type _request_auth: dict, optional
417
+ :param _content_type: force content-type for the request.
418
+ :type _content_type: str, Optional
419
+ :param _headers: set to override the headers for a single
420
+ request; this effectively ignores the headers
421
+ in the spec for a single request.
422
+ :type _headers: dict, optional
423
+ :param _host_index: set to override the host_index for a single
424
+ request; this effectively ignores the host_index
425
+ in the spec for a single request.
426
+ :type _host_index: int, optional
427
+ :return: Returns the result object.
428
+ """ # noqa: E501
429
+
430
+ _param = self._get_agent_templates_serialize(
431
+ _request_auth=_request_auth,
432
+ _content_type=_content_type,
433
+ _headers=_headers,
434
+ _host_index=_host_index
435
+ )
436
+
437
+ _response_types_map: Dict[str, Optional[str]] = {
438
+ '200': "GetAgentTemplates200Response",
439
+ '401': "UnauthorizedErrorReponse",
440
+ '400': "BadRequestErrorResponse",
441
+ '500': "InternalServerErrorResponse",
442
+ }
443
+ response_data = self.api_client.call_api(
444
+ *_param,
445
+ _request_timeout=_request_timeout
446
+ )
447
+ response_data.read()
448
+ return self.api_client.response_deserialize(
449
+ response_data=response_data,
450
+ response_types_map=_response_types_map,
451
+ )
452
+
453
+
454
+ @validate_call
455
+ def get_agent_templates_without_preload_content(
456
+ self,
457
+ _request_timeout: Union[
458
+ None,
459
+ Annotated[StrictFloat, Field(gt=0)],
460
+ Tuple[
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Annotated[StrictFloat, Field(gt=0)]
463
+ ]
464
+ ] = None,
465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
466
+ _content_type: Optional[StrictStr] = None,
467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
469
+ ) -> RESTResponseType:
470
+ """Get agent templates
471
+
472
+
473
+ :param _request_timeout: timeout setting for this request. If one
474
+ number provided, it will be total request
475
+ timeout. It can also be a pair (tuple) of
476
+ (connection, read) timeouts.
477
+ :type _request_timeout: int, tuple(int, int), optional
478
+ :param _request_auth: set to override the auth_settings for an a single
479
+ request; this effectively ignores the
480
+ authentication in the spec for a single request.
481
+ :type _request_auth: dict, optional
482
+ :param _content_type: force content-type for the request.
483
+ :type _content_type: str, Optional
484
+ :param _headers: set to override the headers for a single
485
+ request; this effectively ignores the headers
486
+ in the spec for a single request.
487
+ :type _headers: dict, optional
488
+ :param _host_index: set to override the host_index for a single
489
+ request; this effectively ignores the host_index
490
+ in the spec for a single request.
491
+ :type _host_index: int, optional
492
+ :return: Returns the result object.
493
+ """ # noqa: E501
494
+
495
+ _param = self._get_agent_templates_serialize(
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': "GetAgentTemplates200Response",
504
+ '401': "UnauthorizedErrorReponse",
505
+ '400': "BadRequestErrorResponse",
506
+ '500': "InternalServerErrorResponse",
507
+ }
508
+ response_data = self.api_client.call_api(
509
+ *_param,
510
+ _request_timeout=_request_timeout
511
+ )
512
+ return response_data.response
513
+
514
+
515
+ def _get_agent_templates_serialize(
516
+ self,
517
+ _request_auth,
518
+ _content_type,
519
+ _headers,
520
+ _host_index,
521
+ ) -> RequestSerialized:
522
+
523
+ _host = None
524
+
525
+ _collection_formats: Dict[str, str] = {
526
+ }
527
+
528
+ _path_params: Dict[str, str] = {}
529
+ _query_params: List[Tuple[str, str]] = []
530
+ _header_params: Dict[str, Optional[str]] = _headers or {}
531
+ _form_params: List[Tuple[str, str]] = []
532
+ _files: Dict[
533
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
534
+ ] = {}
535
+ _body_params: Optional[bytes] = None
536
+
537
+ # process the path parameters
538
+ # process the query parameters
539
+ # process the header parameters
540
+ # process the form parameters
541
+ # process the body parameter
542
+
543
+
544
+ # set the HTTP header `Accept`
545
+ if 'Accept' not in _header_params:
546
+ _header_params['Accept'] = self.api_client.select_header_accept(
547
+ [
548
+ 'application/json'
549
+ ]
550
+ )
551
+
552
+
553
+ # authentication setting
554
+ _auth_settings: List[str] = [
555
+ 'BearerAuth'
556
+ ]
557
+
558
+ return self.api_client.param_serialize(
559
+ method='GET',
560
+ resource_path='/agent/template',
561
+ path_params=_path_params,
562
+ query_params=_query_params,
563
+ header_params=_header_params,
564
+ body=_body_params,
565
+ post_params=_form_params,
566
+ files=_files,
567
+ auth_settings=_auth_settings,
568
+ collection_formats=_collection_formats,
569
+ _host=_host,
570
+ _request_auth=_request_auth
571
+ )
572
+
573
+