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.
- smallestai/__init__.py +95 -0
- smallestai/atoms/__init__.py +182 -0
- smallestai/atoms/api/__init__.py +12 -0
- smallestai/atoms/api/agent_templates_api.py +573 -0
- smallestai/atoms/api/agents_api.py +1465 -0
- smallestai/atoms/api/calls_api.py +320 -0
- smallestai/atoms/api/campaigns_api.py +1689 -0
- smallestai/atoms/api/knowledge_base_api.py +2271 -0
- smallestai/atoms/api/logs_api.py +305 -0
- smallestai/atoms/api/organization_api.py +285 -0
- smallestai/atoms/api/user_api.py +285 -0
- smallestai/atoms/api_client.py +797 -0
- smallestai/atoms/api_response.py +21 -0
- smallestai/atoms/atoms_client.py +560 -0
- smallestai/atoms/configuration.py +582 -0
- smallestai/atoms/exceptions.py +216 -0
- smallestai/atoms/models/__init__.py +72 -0
- smallestai/atoms/models/agent_dto.py +130 -0
- smallestai/atoms/models/agent_dto_language.py +91 -0
- smallestai/atoms/models/agent_dto_synthesizer.py +99 -0
- smallestai/atoms/models/agent_dto_synthesizer_voice_config.py +111 -0
- smallestai/atoms/models/api_response.py +89 -0
- smallestai/atoms/models/bad_request_error_response.py +89 -0
- smallestai/atoms/models/create_agent_from_template200_response.py +89 -0
- smallestai/atoms/models/create_agent_from_template_request.py +91 -0
- smallestai/atoms/models/create_agent_request.py +113 -0
- smallestai/atoms/models/create_agent_request_language.py +124 -0
- smallestai/atoms/models/create_agent_request_language_synthesizer.py +110 -0
- smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +137 -0
- smallestai/atoms/models/create_campaign200_response.py +93 -0
- smallestai/atoms/models/create_campaign200_response_data.py +106 -0
- smallestai/atoms/models/create_campaign200_response_inner.py +106 -0
- smallestai/atoms/models/create_campaign201_response.py +93 -0
- smallestai/atoms/models/create_campaign201_response_data.py +104 -0
- smallestai/atoms/models/create_campaign_request.py +93 -0
- smallestai/atoms/models/create_knowledge_base201_response.py +89 -0
- smallestai/atoms/models/create_knowledge_base_request.py +89 -0
- smallestai/atoms/models/delete_agent200_response.py +87 -0
- smallestai/atoms/models/get_agent_by_id200_response.py +93 -0
- smallestai/atoms/models/get_agent_templates200_response.py +97 -0
- smallestai/atoms/models/get_agent_templates200_response_data_inner.py +97 -0
- smallestai/atoms/models/get_agents200_response.py +93 -0
- smallestai/atoms/models/get_agents200_response_data.py +101 -0
- smallestai/atoms/models/get_campaign_by_id200_response.py +93 -0
- smallestai/atoms/models/get_campaign_by_id200_response_data.py +114 -0
- smallestai/atoms/models/get_campaigns200_response.py +97 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner.py +118 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py +89 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py +89 -0
- smallestai/atoms/models/get_campaigns_request.py +89 -0
- smallestai/atoms/models/get_conversation200_response.py +93 -0
- smallestai/atoms/models/get_conversation200_response_data.py +125 -0
- smallestai/atoms/models/get_conversation_logs200_response.py +93 -0
- smallestai/atoms/models/get_conversation_logs200_response_data.py +125 -0
- smallestai/atoms/models/get_current_user200_response.py +93 -0
- smallestai/atoms/models/get_current_user200_response_data.py +99 -0
- smallestai/atoms/models/get_knowledge_base_by_id200_response.py +93 -0
- smallestai/atoms/models/get_knowledge_base_items200_response.py +97 -0
- smallestai/atoms/models/get_knowledge_bases200_response.py +97 -0
- smallestai/atoms/models/get_organization200_response.py +93 -0
- smallestai/atoms/models/get_organization200_response_data.py +105 -0
- smallestai/atoms/models/get_organization200_response_data_members_inner.py +89 -0
- smallestai/atoms/models/get_organization200_response_data_subscription.py +87 -0
- smallestai/atoms/models/internal_server_error_response.py +89 -0
- smallestai/atoms/models/knowledge_base_dto.py +93 -0
- smallestai/atoms/models/knowledge_base_item_dto.py +124 -0
- smallestai/atoms/models/start_outbound_call200_response.py +93 -0
- smallestai/atoms/models/start_outbound_call200_response_data.py +87 -0
- smallestai/atoms/models/start_outbound_call_request.py +89 -0
- smallestai/atoms/models/unauthorized_error_reponse.py +89 -0
- smallestai/atoms/models/update_agent200_response.py +89 -0
- smallestai/atoms/models/update_agent_request.py +119 -0
- smallestai/atoms/models/update_agent_request_language.py +99 -0
- smallestai/atoms/models/update_agent_request_synthesizer.py +110 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py +137 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py +111 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py +99 -0
- smallestai/atoms/models/upload_text_to_knowledge_base_request.py +89 -0
- smallestai/atoms/py.typed +0 -0
- smallestai/atoms/rest.py +258 -0
- smallestai/waves/__init__.py +5 -0
- smallest/async_tts.py → smallestai/waves/async_waves_client.py +3 -3
- {smallest → smallestai/waves}/stream_tts.py +6 -6
- {smallest → smallestai/waves}/utils.py +2 -2
- smallest/tts.py → smallestai/waves/waves_client.py +3 -3
- {smallestai-2.2.0.dist-info → smallestai-3.0.0.dist-info}/METADATA +194 -42
- smallestai-3.0.0.dist-info/RECORD +92 -0
- {smallestai-2.2.0.dist-info → smallestai-3.0.0.dist-info}/WHEEL +1 -1
- smallestai-3.0.0.dist-info/top_level.txt +1 -0
- smallest/__init__.py +0 -5
- smallestai-2.2.0.dist-info/RECORD +0 -12
- smallestai-2.2.0.dist-info/top_level.txt +0 -1
- {smallest → smallestai/waves}/exceptions.py +0 -0
- {smallest → smallestai/waves}/models.py +0 -0
- {smallestai-2.2.0.dist-info → smallestai-3.0.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,320 @@
|
|
|
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.start_outbound_call200_response import StartOutboundCall200Response
|
|
20
|
+
from smallestai.atoms.models.start_outbound_call_request import StartOutboundCallRequest
|
|
21
|
+
|
|
22
|
+
from smallestai.atoms.api_client import ApiClient, RequestSerialized
|
|
23
|
+
from smallestai.atoms.api_response import ApiResponse
|
|
24
|
+
from smallestai.atoms.rest import RESTResponseType
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CallsApi:
|
|
28
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
|
+
Ref: https://openapi-generator.tech
|
|
30
|
+
|
|
31
|
+
Do not edit the class manually.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, api_client=None) -> None:
|
|
35
|
+
if api_client is None:
|
|
36
|
+
api_client = ApiClient.get_default()
|
|
37
|
+
self.api_client = api_client
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@validate_call
|
|
41
|
+
def start_outbound_call(
|
|
42
|
+
self,
|
|
43
|
+
start_outbound_call_request: StartOutboundCallRequest,
|
|
44
|
+
_request_timeout: Union[
|
|
45
|
+
None,
|
|
46
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
47
|
+
Tuple[
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
50
|
+
]
|
|
51
|
+
] = None,
|
|
52
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
53
|
+
_content_type: Optional[StrictStr] = None,
|
|
54
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
56
|
+
) -> StartOutboundCall200Response:
|
|
57
|
+
"""Start an outbound call
|
|
58
|
+
|
|
59
|
+
Initiates an outbound conversation with a specified agent and phone number.
|
|
60
|
+
|
|
61
|
+
:param start_outbound_call_request: (required)
|
|
62
|
+
:type start_outbound_call_request: StartOutboundCallRequest
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._start_outbound_call_serialize(
|
|
86
|
+
start_outbound_call_request=start_outbound_call_request,
|
|
87
|
+
_request_auth=_request_auth,
|
|
88
|
+
_content_type=_content_type,
|
|
89
|
+
_headers=_headers,
|
|
90
|
+
_host_index=_host_index
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
|
+
'200': "StartOutboundCall200Response",
|
|
95
|
+
'400': "BadRequestErrorResponse",
|
|
96
|
+
'401': "UnauthorizedErrorReponse",
|
|
97
|
+
'500': "InternalServerErrorResponse",
|
|
98
|
+
}
|
|
99
|
+
response_data = self.api_client.call_api(
|
|
100
|
+
*_param,
|
|
101
|
+
_request_timeout=_request_timeout
|
|
102
|
+
)
|
|
103
|
+
response_data.read()
|
|
104
|
+
return self.api_client.response_deserialize(
|
|
105
|
+
response_data=response_data,
|
|
106
|
+
response_types_map=_response_types_map,
|
|
107
|
+
).data
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
@validate_call
|
|
111
|
+
def start_outbound_call_with_http_info(
|
|
112
|
+
self,
|
|
113
|
+
start_outbound_call_request: StartOutboundCallRequest,
|
|
114
|
+
_request_timeout: Union[
|
|
115
|
+
None,
|
|
116
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
117
|
+
Tuple[
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
120
|
+
]
|
|
121
|
+
] = None,
|
|
122
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
123
|
+
_content_type: Optional[StrictStr] = None,
|
|
124
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
126
|
+
) -> ApiResponse[StartOutboundCall200Response]:
|
|
127
|
+
"""Start an outbound call
|
|
128
|
+
|
|
129
|
+
Initiates an outbound conversation with a specified agent and phone number.
|
|
130
|
+
|
|
131
|
+
:param start_outbound_call_request: (required)
|
|
132
|
+
:type start_outbound_call_request: StartOutboundCallRequest
|
|
133
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
134
|
+
number provided, it will be total request
|
|
135
|
+
timeout. It can also be a pair (tuple) of
|
|
136
|
+
(connection, read) timeouts.
|
|
137
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
138
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
139
|
+
request; this effectively ignores the
|
|
140
|
+
authentication in the spec for a single request.
|
|
141
|
+
:type _request_auth: dict, optional
|
|
142
|
+
:param _content_type: force content-type for the request.
|
|
143
|
+
:type _content_type: str, Optional
|
|
144
|
+
:param _headers: set to override the headers for a single
|
|
145
|
+
request; this effectively ignores the headers
|
|
146
|
+
in the spec for a single request.
|
|
147
|
+
:type _headers: dict, optional
|
|
148
|
+
:param _host_index: set to override the host_index for a single
|
|
149
|
+
request; this effectively ignores the host_index
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _host_index: int, optional
|
|
152
|
+
:return: Returns the result object.
|
|
153
|
+
""" # noqa: E501
|
|
154
|
+
|
|
155
|
+
_param = self._start_outbound_call_serialize(
|
|
156
|
+
start_outbound_call_request=start_outbound_call_request,
|
|
157
|
+
_request_auth=_request_auth,
|
|
158
|
+
_content_type=_content_type,
|
|
159
|
+
_headers=_headers,
|
|
160
|
+
_host_index=_host_index
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
164
|
+
'200': "StartOutboundCall200Response",
|
|
165
|
+
'400': "BadRequestErrorResponse",
|
|
166
|
+
'401': "UnauthorizedErrorReponse",
|
|
167
|
+
'500': "InternalServerErrorResponse",
|
|
168
|
+
}
|
|
169
|
+
response_data = self.api_client.call_api(
|
|
170
|
+
*_param,
|
|
171
|
+
_request_timeout=_request_timeout
|
|
172
|
+
)
|
|
173
|
+
response_data.read()
|
|
174
|
+
return self.api_client.response_deserialize(
|
|
175
|
+
response_data=response_data,
|
|
176
|
+
response_types_map=_response_types_map,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@validate_call
|
|
181
|
+
def start_outbound_call_without_preload_content(
|
|
182
|
+
self,
|
|
183
|
+
start_outbound_call_request: StartOutboundCallRequest,
|
|
184
|
+
_request_timeout: Union[
|
|
185
|
+
None,
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Tuple[
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_content_type: Optional[StrictStr] = None,
|
|
194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
196
|
+
) -> RESTResponseType:
|
|
197
|
+
"""Start an outbound call
|
|
198
|
+
|
|
199
|
+
Initiates an outbound conversation with a specified agent and phone number.
|
|
200
|
+
|
|
201
|
+
:param start_outbound_call_request: (required)
|
|
202
|
+
:type start_outbound_call_request: StartOutboundCallRequest
|
|
203
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
204
|
+
number provided, it will be total request
|
|
205
|
+
timeout. It can also be a pair (tuple) of
|
|
206
|
+
(connection, read) timeouts.
|
|
207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
209
|
+
request; this effectively ignores the
|
|
210
|
+
authentication in the spec for a single request.
|
|
211
|
+
:type _request_auth: dict, optional
|
|
212
|
+
:param _content_type: force content-type for the request.
|
|
213
|
+
:type _content_type: str, Optional
|
|
214
|
+
:param _headers: set to override the headers for a single
|
|
215
|
+
request; this effectively ignores the headers
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _headers: dict, optional
|
|
218
|
+
:param _host_index: set to override the host_index for a single
|
|
219
|
+
request; this effectively ignores the host_index
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _host_index: int, optional
|
|
222
|
+
:return: Returns the result object.
|
|
223
|
+
""" # noqa: E501
|
|
224
|
+
|
|
225
|
+
_param = self._start_outbound_call_serialize(
|
|
226
|
+
start_outbound_call_request=start_outbound_call_request,
|
|
227
|
+
_request_auth=_request_auth,
|
|
228
|
+
_content_type=_content_type,
|
|
229
|
+
_headers=_headers,
|
|
230
|
+
_host_index=_host_index
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
234
|
+
'200': "StartOutboundCall200Response",
|
|
235
|
+
'400': "BadRequestErrorResponse",
|
|
236
|
+
'401': "UnauthorizedErrorReponse",
|
|
237
|
+
'500': "InternalServerErrorResponse",
|
|
238
|
+
}
|
|
239
|
+
response_data = self.api_client.call_api(
|
|
240
|
+
*_param,
|
|
241
|
+
_request_timeout=_request_timeout
|
|
242
|
+
)
|
|
243
|
+
return response_data.response
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _start_outbound_call_serialize(
|
|
247
|
+
self,
|
|
248
|
+
start_outbound_call_request,
|
|
249
|
+
_request_auth,
|
|
250
|
+
_content_type,
|
|
251
|
+
_headers,
|
|
252
|
+
_host_index,
|
|
253
|
+
) -> RequestSerialized:
|
|
254
|
+
|
|
255
|
+
_host = None
|
|
256
|
+
|
|
257
|
+
_collection_formats: Dict[str, str] = {
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
_path_params: Dict[str, str] = {}
|
|
261
|
+
_query_params: List[Tuple[str, str]] = []
|
|
262
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
263
|
+
_form_params: List[Tuple[str, str]] = []
|
|
264
|
+
_files: Dict[
|
|
265
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
266
|
+
] = {}
|
|
267
|
+
_body_params: Optional[bytes] = None
|
|
268
|
+
|
|
269
|
+
# process the path parameters
|
|
270
|
+
# process the query parameters
|
|
271
|
+
# process the header parameters
|
|
272
|
+
# process the form parameters
|
|
273
|
+
# process the body parameter
|
|
274
|
+
if start_outbound_call_request is not None:
|
|
275
|
+
_body_params = start_outbound_call_request
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
# set the HTTP header `Accept`
|
|
279
|
+
if 'Accept' not in _header_params:
|
|
280
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
281
|
+
[
|
|
282
|
+
'application/json'
|
|
283
|
+
]
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
# set the HTTP header `Content-Type`
|
|
287
|
+
if _content_type:
|
|
288
|
+
_header_params['Content-Type'] = _content_type
|
|
289
|
+
else:
|
|
290
|
+
_default_content_type = (
|
|
291
|
+
self.api_client.select_header_content_type(
|
|
292
|
+
[
|
|
293
|
+
'application/json'
|
|
294
|
+
]
|
|
295
|
+
)
|
|
296
|
+
)
|
|
297
|
+
if _default_content_type is not None:
|
|
298
|
+
_header_params['Content-Type'] = _default_content_type
|
|
299
|
+
|
|
300
|
+
# authentication setting
|
|
301
|
+
_auth_settings: List[str] = [
|
|
302
|
+
'BearerAuth'
|
|
303
|
+
]
|
|
304
|
+
|
|
305
|
+
return self.api_client.param_serialize(
|
|
306
|
+
method='POST',
|
|
307
|
+
resource_path='/conversation/outbound',
|
|
308
|
+
path_params=_path_params,
|
|
309
|
+
query_params=_query_params,
|
|
310
|
+
header_params=_header_params,
|
|
311
|
+
body=_body_params,
|
|
312
|
+
post_params=_form_params,
|
|
313
|
+
files=_files,
|
|
314
|
+
auth_settings=_auth_settings,
|
|
315
|
+
collection_formats=_collection_formats,
|
|
316
|
+
_host=_host,
|
|
317
|
+
_request_auth=_request_auth
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
|