smallestai 3.0.0__py3-none-any.whl → 3.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of smallestai might be problematic. Click here for more details.
- smallestai/atoms/models/agent_dto.py +2 -2
- smallestai/atoms/models/create_agent_request.py +4 -4
- smallestai/atoms/models/get_campaign_by_id200_response_data.py +11 -15
- smallestai/atoms/models/update_agent_request.py +4 -4
- {smallestai-3.0.0.dist-info → smallestai-3.0.1.dist-info}/METADATA +120 -133
- {smallestai-3.0.0.dist-info → smallestai-3.0.1.dist-info}/RECORD +9 -14
- smallestai/atoms/models/create_campaign200_response.py +0 -93
- smallestai/atoms/models/create_campaign200_response_data.py +0 -106
- smallestai/atoms/models/create_campaign200_response_inner.py +0 -106
- smallestai/atoms/models/get_conversation200_response.py +0 -93
- smallestai/atoms/models/get_conversation200_response_data.py +0 -125
- {smallestai-3.0.0.dist-info → smallestai-3.0.1.dist-info}/WHEEL +0 -0
- {smallestai-3.0.0.dist-info → smallestai-3.0.1.dist-info}/licenses/LICENSE +0 -0
- {smallestai-3.0.0.dist-info → smallestai-3.0.1.dist-info}/top_level.txt +0 -0
|
@@ -50,8 +50,8 @@ class AgentDTO(BaseModel):
|
|
|
50
50
|
if value is None:
|
|
51
51
|
return value
|
|
52
52
|
|
|
53
|
-
if value not in set(['
|
|
54
|
-
raise ValueError("must be one of enum values ('
|
|
53
|
+
if value not in set(['electron-v1', 'electron-v2', 'gpt-4o-mini']):
|
|
54
|
+
raise ValueError("must be one of enum values ('electron-v1', 'electron-v2', 'gpt-4o-mini')")
|
|
55
55
|
return value
|
|
56
56
|
|
|
57
57
|
model_config = ConfigDict(
|
|
@@ -31,7 +31,7 @@ class CreateAgentRequest(BaseModel):
|
|
|
31
31
|
description: Optional[StrictStr] = None
|
|
32
32
|
language: Optional[CreateAgentRequestLanguage] = None
|
|
33
33
|
global_knowledge_base_id: Optional[StrictStr] = Field(default=None, description="The global knowledge base ID of the agent. You can create a global knowledge base by using the /knowledgebase endpoint and assign it to the agent. The agent will use this knowledge base for its responses.", alias="globalKnowledgeBaseId")
|
|
34
|
-
slm_model: Optional[StrictStr] = Field(default='
|
|
34
|
+
slm_model: Optional[StrictStr] = Field(default='electron-v1', description="The LLM model to use for the agent. LLM model will be used to generate the response and take decisions based on the user's query.", alias="slmModel")
|
|
35
35
|
default_variables: Optional[Dict[str, Any]] = Field(default=None, description="The default variables to use for the agent. These variables will be used if no variables are provided when initiating a conversation with the agent.", alias="defaultVariables")
|
|
36
36
|
telephony_product_id: Optional[StrictStr] = Field(default=None, description="The telephony product ID of the agent. This is the product ID of the telephony product that will be used to make the outbound call. You can buy telephone number and assign it to the agent.", alias="telephonyProductId")
|
|
37
37
|
__properties: ClassVar[List[str]] = ["name", "description", "language", "globalKnowledgeBaseId", "slmModel", "defaultVariables", "telephonyProductId"]
|
|
@@ -42,8 +42,8 @@ class CreateAgentRequest(BaseModel):
|
|
|
42
42
|
if value is None:
|
|
43
43
|
return value
|
|
44
44
|
|
|
45
|
-
if value not in set(['
|
|
46
|
-
raise ValueError("must be one of enum values ('
|
|
45
|
+
if value not in set(['electron-v1', 'electron-v2', 'gpt-4o-mini']):
|
|
46
|
+
raise ValueError("must be one of enum values ('electron-v1', 'electron-v2', 'gpt-4o-mini')")
|
|
47
47
|
return value
|
|
48
48
|
|
|
49
49
|
model_config = ConfigDict(
|
|
@@ -104,7 +104,7 @@ class CreateAgentRequest(BaseModel):
|
|
|
104
104
|
"description": obj.get("description"),
|
|
105
105
|
"language": CreateAgentRequestLanguage.from_dict(obj["language"]) if obj.get("language") is not None else None,
|
|
106
106
|
"globalKnowledgeBaseId": obj.get("globalKnowledgeBaseId"),
|
|
107
|
-
"slmModel": obj.get("slmModel") if obj.get("slmModel") is not None else '
|
|
107
|
+
"slmModel": obj.get("slmModel") if obj.get("slmModel") is not None else 'electron-v1',
|
|
108
108
|
"defaultVariables": obj.get("defaultVariables"),
|
|
109
109
|
"telephonyProductId": obj.get("telephonyProductId")
|
|
110
110
|
})
|
|
@@ -18,10 +18,8 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from smallestai.atoms.models.get_campaigns200_response_data_inner_agent import GetCampaigns200ResponseDataInnerAgent
|
|
24
|
-
from smallestai.atoms.models.get_campaigns200_response_data_inner_audience import GetCampaigns200ResponseDataInnerAudience
|
|
25
23
|
from typing import Optional, Set
|
|
26
24
|
from typing_extensions import Self
|
|
27
25
|
|
|
@@ -33,13 +31,15 @@ class GetCampaignById200ResponseData(BaseModel):
|
|
|
33
31
|
name: Optional[StrictStr] = Field(default=None, description="The name of the campaign")
|
|
34
32
|
description: Optional[StrictStr] = Field(default=None, description="The description of the campaign")
|
|
35
33
|
organization: Optional[StrictStr] = Field(default=None, description="The ID of the organization")
|
|
36
|
-
|
|
34
|
+
agent_id: Optional[StrictStr] = Field(default=None, description="The ID of the agent", alias="agentId")
|
|
37
35
|
created_by: Optional[StrictStr] = Field(default=None, description="The ID of the user who created the campaign", alias="createdBy")
|
|
38
|
-
|
|
36
|
+
audience_id: Optional[StrictStr] = Field(default=None, description="The ID of the audience", alias="audienceId")
|
|
39
37
|
participants_count: Optional[StrictInt] = Field(default=None, description="The number of participants in the campaign", alias="participantsCount")
|
|
40
38
|
created_at: Optional[datetime] = Field(default=None, description="The date and time when the campaign was created", alias="createdAt")
|
|
41
39
|
updated_at: Optional[datetime] = Field(default=None, description="The date and time when the campaign was last updated", alias="updatedAt")
|
|
42
|
-
|
|
40
|
+
is_campaign_in_progress: Optional[StrictBool] = Field(default=None, description="Whether the campaign is in progress", alias="isCampaignInProgress")
|
|
41
|
+
is_campaign_completed: Optional[StrictBool] = Field(default=None, description="Whether the campaign is completed", alias="isCampaignCompleted")
|
|
42
|
+
__properties: ClassVar[List[str]] = ["_id", "name", "description", "organization", "agentId", "createdBy", "audienceId", "participantsCount", "createdAt", "updatedAt", "isCampaignInProgress", "isCampaignCompleted"]
|
|
43
43
|
|
|
44
44
|
model_config = ConfigDict(
|
|
45
45
|
populate_by_name=True,
|
|
@@ -80,12 +80,6 @@ class GetCampaignById200ResponseData(BaseModel):
|
|
|
80
80
|
exclude=excluded_fields,
|
|
81
81
|
exclude_none=True,
|
|
82
82
|
)
|
|
83
|
-
# override the default output from pydantic by calling `to_dict()` of agent
|
|
84
|
-
if self.agent:
|
|
85
|
-
_dict['agent'] = self.agent.to_dict()
|
|
86
|
-
# override the default output from pydantic by calling `to_dict()` of audience
|
|
87
|
-
if self.audience:
|
|
88
|
-
_dict['audience'] = self.audience.to_dict()
|
|
89
83
|
return _dict
|
|
90
84
|
|
|
91
85
|
@classmethod
|
|
@@ -102,12 +96,14 @@ class GetCampaignById200ResponseData(BaseModel):
|
|
|
102
96
|
"name": obj.get("name"),
|
|
103
97
|
"description": obj.get("description"),
|
|
104
98
|
"organization": obj.get("organization"),
|
|
105
|
-
"
|
|
99
|
+
"agentId": obj.get("agentId"),
|
|
106
100
|
"createdBy": obj.get("createdBy"),
|
|
107
|
-
"
|
|
101
|
+
"audienceId": obj.get("audienceId"),
|
|
108
102
|
"participantsCount": obj.get("participantsCount"),
|
|
109
103
|
"createdAt": obj.get("createdAt"),
|
|
110
|
-
"updatedAt": obj.get("updatedAt")
|
|
104
|
+
"updatedAt": obj.get("updatedAt"),
|
|
105
|
+
"isCampaignInProgress": obj.get("isCampaignInProgress"),
|
|
106
|
+
"isCampaignCompleted": obj.get("isCampaignCompleted")
|
|
111
107
|
})
|
|
112
108
|
return _obj
|
|
113
109
|
|
|
@@ -33,7 +33,7 @@ class UpdateAgentRequest(BaseModel):
|
|
|
33
33
|
language: Optional[UpdateAgentRequestLanguage] = None
|
|
34
34
|
synthesizer: Optional[UpdateAgentRequestSynthesizer] = None
|
|
35
35
|
global_knowledge_base_id: Optional[StrictStr] = Field(default=None, alias="globalKnowledgeBaseId")
|
|
36
|
-
slm_model: Optional[StrictStr] = Field(default='
|
|
36
|
+
slm_model: Optional[StrictStr] = Field(default='electron-v1', alias="slmModel")
|
|
37
37
|
default_variables: Optional[Dict[str, Any]] = Field(default=None, description="The default variables to use for the agent. These variables will be used if no variables are provided when initiating a conversation with the agent.", alias="defaultVariables")
|
|
38
38
|
telephony_product_id: Optional[StrictStr] = Field(default=None, description="The telephony product ID of the agent. This is the product ID of the telephony product that will be used to make the outbound call. You can buy telephone number and assign it to the agent.", alias="telephonyProductId")
|
|
39
39
|
__properties: ClassVar[List[str]] = ["name", "description", "language", "synthesizer", "globalKnowledgeBaseId", "slmModel", "defaultVariables", "telephonyProductId"]
|
|
@@ -44,8 +44,8 @@ class UpdateAgentRequest(BaseModel):
|
|
|
44
44
|
if value is None:
|
|
45
45
|
return value
|
|
46
46
|
|
|
47
|
-
if value not in set(['
|
|
48
|
-
raise ValueError("must be one of enum values ('
|
|
47
|
+
if value not in set(['electron-v1', 'electron-v2', 'gpt-4o-mini']):
|
|
48
|
+
raise ValueError("must be one of enum values ('electron-v1', 'electron-v2', 'gpt-4o-mini')")
|
|
49
49
|
return value
|
|
50
50
|
|
|
51
51
|
model_config = ConfigDict(
|
|
@@ -110,7 +110,7 @@ class UpdateAgentRequest(BaseModel):
|
|
|
110
110
|
"language": UpdateAgentRequestLanguage.from_dict(obj["language"]) if obj.get("language") is not None else None,
|
|
111
111
|
"synthesizer": UpdateAgentRequestSynthesizer.from_dict(obj["synthesizer"]) if obj.get("synthesizer") is not None else None,
|
|
112
112
|
"globalKnowledgeBaseId": obj.get("globalKnowledgeBaseId"),
|
|
113
|
-
"slmModel": obj.get("slmModel") if obj.get("slmModel") is not None else '
|
|
113
|
+
"slmModel": obj.get("slmModel") if obj.get("slmModel") is not None else 'electron-v1',
|
|
114
114
|
"defaultVariables": obj.get("defaultVariables"),
|
|
115
115
|
"telephonyProductId": obj.get("telephonyProductId")
|
|
116
116
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: smallestai
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: Official Python client for the Smallest AI API
|
|
5
5
|
Author-email: Smallest <support@smallest.ai>
|
|
6
6
|
License: MIT
|
|
@@ -20,6 +20,7 @@ Requires-Dist: urllib3<3.0.0,>=1.25.3
|
|
|
20
20
|
Requires-Dist: python-dateutil>=2.8.2
|
|
21
21
|
Requires-Dist: pydantic>=2
|
|
22
22
|
Requires-Dist: typing-extensions>=4.7.1
|
|
23
|
+
Requires-Dist: audioop-lts; python_version >= "3.13"
|
|
23
24
|
Provides-Extra: test
|
|
24
25
|
Requires-Dist: jiwer; extra == "test"
|
|
25
26
|
Requires-Dist: httpx; extra == "test"
|
|
@@ -53,19 +54,23 @@ Dynamic: license-file
|
|
|
53
54
|
|
|
54
55
|
## Official Python Client for Smallest AI API
|
|
55
56
|
|
|
56
|
-
Smallest AI
|
|
57
|
+
Smallest AI offers an end to end Voice AI suite for developers trying to build real-time voice agents. You can either directly use our Text to Speech APIs through the Waves Client or use the Atoms Client to build and operate end to end enterprise ready Voice Agents.
|
|
57
58
|
|
|
58
|
-
Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously.
|
|
59
|
+
With this sdk, you can easily interact with both Waves and Atoms from any Python 3.9+ application, by utilising WavesClient and AtomsClient classes respectively. Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously. AtomsClient provides a simpler way of interacting with all our API's to develop and run agentic workflows.
|
|
60
|
+
|
|
61
|
+
To learn how to use our API's, check out our documentation for [Atoms](https://atoms-docs.smallest.ai/introduction) and [Waves](https://waves-docs.smallest.ai/content/introduction/)
|
|
59
62
|
|
|
60
63
|
## Table of Contents
|
|
61
64
|
|
|
62
65
|
- [Installation](#installation)
|
|
63
66
|
- [Get the API Key](#get-the-api-key)
|
|
64
|
-
- [Atoms
|
|
65
|
-
- [
|
|
66
|
-
- [
|
|
67
|
-
- [
|
|
68
|
-
- [
|
|
67
|
+
- [What are Atoms?](#what-are-atoms)
|
|
68
|
+
- [Creating your first Agent](#creating-your-first-agent)
|
|
69
|
+
- [Placing an outbound call](#placing-an-outbound-call)
|
|
70
|
+
- [Providing context to the agent](#providing-context-to-the-agent)
|
|
71
|
+
- [Configuring workflows to drive conversations](#configuring-workflows-to-drive-conversations)
|
|
72
|
+
- [Provisioning bulk calling using campaigns](#provisioning-bulk-calling-using-campaigns)
|
|
73
|
+
- [Getting started with Waves](#getting-started-with-waves)
|
|
69
74
|
- [Best Practices for Input Text](#best-practices-for-input-text)
|
|
70
75
|
- [Examples](#examples)
|
|
71
76
|
- [Synchronous](#synchronous)
|
|
@@ -97,140 +102,122 @@ When using an SDK in your application, make sure to pin to at least the major ve
|
|
|
97
102
|
4. Export the API Key in your environment with the name `SMALLEST_API_KEY`, ensuring that your application can access it securely for authentication.
|
|
98
103
|
|
|
99
104
|
|
|
100
|
-
## Atoms
|
|
105
|
+
## What are Atoms
|
|
106
|
+
|
|
107
|
+
Atoms are agents that can talk to anyone on voice or text in any language, in any voice. Imagine an AI that you can hire to perform end-to-end tasks for your business. The following examples give an overview of how AtomsClient leverages abstractions such as KnowledgeBase, Campaigns and graph-based Workflows to let you build the smartest voice agent for your usecase.
|
|
101
108
|
|
|
102
|
-
|
|
109
|
+
You can find the full reference for Atoms [here](./docs/atoms/Api.md).
|
|
103
110
|
|
|
104
|
-
|
|
111
|
+
### Creating your first Agent
|
|
105
112
|
|
|
106
113
|
```python
|
|
107
|
-
|
|
108
|
-
from smallestai.atoms.rest import ApiException
|
|
109
|
-
from pprint import pprint
|
|
110
|
-
|
|
111
|
-
# Defining the host is optional and defaults to https://atoms-api.smallest.ai/api/v1
|
|
112
|
-
# See configuration.py for a list of all supported configuration parameters.
|
|
113
|
-
configuration = atoms.Configuration(
|
|
114
|
-
host = "https://atoms-api.smallest.ai/api/v1"
|
|
115
|
-
)
|
|
114
|
+
from smallestai.atoms import AtomsClient
|
|
116
115
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
#
|
|
116
|
+
TARGET_PHONE_NUMBER = "+919666666666"
|
|
117
|
+
|
|
118
|
+
def main():
|
|
119
|
+
# alternatively, you can export API Key as environment variable SMALLEST_API_KEY.
|
|
120
|
+
config = Configuration(
|
|
121
|
+
access_token = 'SMALLEST_API_KEY'
|
|
122
|
+
)
|
|
121
123
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
atoms_client = AtomsClient(config)
|
|
125
|
+
|
|
126
|
+
agent_id = atoms_client.create_agent(
|
|
127
|
+
create_agent_request={
|
|
128
|
+
"name": "Atoms Multi-Modal Agent",
|
|
129
|
+
"description": "My first atoms agent",
|
|
130
|
+
"language": {
|
|
131
|
+
"enabled": "en",
|
|
132
|
+
"switching": False
|
|
133
|
+
},
|
|
134
|
+
"synthesizer": {
|
|
135
|
+
"voiceConfig": {
|
|
136
|
+
"model": "waves_lightning_large",
|
|
137
|
+
"voiceId": "nyah"
|
|
138
|
+
},
|
|
139
|
+
"speed": 1.2,
|
|
140
|
+
"consistency": 0.5,
|
|
141
|
+
"similarity": 0,
|
|
142
|
+
"enhancement": 1
|
|
143
|
+
},
|
|
144
|
+
"slmModel": "electron-v1",
|
|
145
|
+
}
|
|
146
|
+
).data
|
|
147
|
+
|
|
148
|
+
print(f"Successfully created agent with id: {agent_id}")
|
|
126
149
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
# Create an instance of the API class
|
|
130
|
-
api_instance = atoms.AgentTemplatesApi(api_client)
|
|
131
|
-
create_agent_from_template_request = atoms.CreateAgentFromTemplateRequest()
|
|
132
|
-
|
|
133
|
-
try:
|
|
134
|
-
# Create agent from template
|
|
135
|
-
api_response = api_instance.create_agent_from_template(create_agent_from_template_request)
|
|
136
|
-
print("The response of AgentTemplatesApi->create_agent_from_template:\n")
|
|
137
|
-
pprint(api_response)
|
|
138
|
-
except ApiException as e:
|
|
139
|
-
print("Exception when calling AgentTemplatesApi->create_agent_from_template: %s\n" % e)
|
|
150
|
+
if __name__ == "__main__":
|
|
151
|
+
main()
|
|
140
152
|
```
|
|
141
153
|
|
|
142
|
-
###
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
- [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
- [GetCurrentUser200ResponseData](docs/atoms/GetCurrentUser200ResponseData.md)
|
|
210
|
-
- [GetKnowledgeBaseById200Response](docs/atoms/GetKnowledgeBaseById200Response.md)
|
|
211
|
-
- [GetKnowledgeBaseItems200Response](docs/atoms/GetKnowledgeBaseItems200Response.md)
|
|
212
|
-
- [GetKnowledgeBases200Response](docs/atoms/GetKnowledgeBases200Response.md)
|
|
213
|
-
- [GetOrganization200Response](docs/atoms/GetOrganization200Response.md)
|
|
214
|
-
- [GetOrganization200ResponseData](docs/atoms/GetOrganization200ResponseData.md)
|
|
215
|
-
- [GetOrganization200ResponseDataMembersInner](docs/atoms/GetOrganization200ResponseDataMembersInner.md)
|
|
216
|
-
- [GetOrganization200ResponseDataSubscription](docs/atoms/GetOrganization200ResponseDataSubscription.md)
|
|
217
|
-
- [InternalServerErrorResponse](docs/atoms/InternalServerErrorResponse.md)
|
|
218
|
-
- [KnowledgeBaseDTO](docs/atoms/KnowledgeBaseDTO.md)
|
|
219
|
-
- [KnowledgeBaseItemDTO](docs/atoms/KnowledgeBaseItemDTO.md)
|
|
220
|
-
- [StartOutboundCall200Response](docs/atoms/StartOutboundCall200Response.md)
|
|
221
|
-
- [StartOutboundCall200ResponseData](docs/atoms/StartOutboundCall200ResponseData.md)
|
|
222
|
-
- [StartOutboundCallRequest](docs/atoms/StartOutboundCallRequest.md)
|
|
223
|
-
- [UnauthorizedErrorReponse](docs/atoms/UnauthorizedErrorReponse.md)
|
|
224
|
-
- [UpdateAgent200Response](docs/atoms/UpdateAgent200Response.md)
|
|
225
|
-
- [UpdateAgentRequest](docs/atoms/UpdateAgentRequest.md)
|
|
226
|
-
- [UpdateAgentRequestLanguage](docs/atoms/UpdateAgentRequestLanguage.md)
|
|
227
|
-
- [UpdateAgentRequestSynthesizer](docs/atoms/UpdateAgentRequestSynthesizer.md)
|
|
228
|
-
- [UpdateAgentRequestSynthesizerVoiceConfig](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfig.md)
|
|
229
|
-
- [UpdateAgentRequestSynthesizerVoiceConfigOneOf](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf.md)
|
|
230
|
-
- [UpdateAgentRequestSynthesizerVoiceConfigOneOf1](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf1.md)
|
|
231
|
-
- [UploadTextToKnowledgeBaseRequest](docs/atoms/UploadTextToKnowledgeBaseRequest.md)
|
|
232
|
-
|
|
233
|
-
## Waves Documentation
|
|
154
|
+
### Placing an outbound call
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from smallestai.atoms import AtomsClient
|
|
158
|
+
from smallestai.atoms import Configuration
|
|
159
|
+
|
|
160
|
+
TARGET_PHONE_NUMBER = "+919666666666"
|
|
161
|
+
MY_AGENT_ID = "67e****ff*ec***82*3c9e**"
|
|
162
|
+
|
|
163
|
+
def main():
|
|
164
|
+
# assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
|
|
165
|
+
atoms_client = AtomsClient()
|
|
166
|
+
|
|
167
|
+
call_response = atoms_client.start_outbound_call(
|
|
168
|
+
start_outbound_call_request={
|
|
169
|
+
"agent_id": MY_AGENT_ID,
|
|
170
|
+
"phone_number": TARGET_PHONE_NUMBER,
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
print(f"Successfully placed call with id: {call_response.conversation_id}")
|
|
174
|
+
|
|
175
|
+
if __name__ == "__main__":
|
|
176
|
+
main()
|
|
177
|
+
```
|
|
178
|
+
### Providing context to the agent
|
|
179
|
+
|
|
180
|
+
An agent can be attached to a knowledge base, which it can look up during conversations. Here is how you can do it:
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
from smallestai.atoms import AtomsClient
|
|
184
|
+
|
|
185
|
+
def main():
|
|
186
|
+
# assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
|
|
187
|
+
atoms_client = AtomsClient()
|
|
188
|
+
|
|
189
|
+
# Create a new knowledge base
|
|
190
|
+
knowledge_base = atoms_client.create_knowledge_base(
|
|
191
|
+
create_knowledge_base_request={
|
|
192
|
+
"name": "Customer Support Knowledge Base",
|
|
193
|
+
"description": "Contains FAQs and product information"
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
knowledge_base_id = knowledge_base.data
|
|
197
|
+
|
|
198
|
+
with open("product_manual.pdf", "rb") as f:
|
|
199
|
+
media_content = f.read()
|
|
200
|
+
media_response = atoms_client.upload_media_to_knowledge_base(
|
|
201
|
+
id=knowledge_base_id,
|
|
202
|
+
media=media_content
|
|
203
|
+
)
|
|
204
|
+
print("Added product_manual.pdf to knowledge base")
|
|
205
|
+
|
|
206
|
+
if __name__ == "__main__":
|
|
207
|
+
main()
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Configuring workflows to drive conversations
|
|
211
|
+
|
|
212
|
+
An agent can be configured with a graph-based workflow to help it drive meaningful conversations. You can explore making one on our [platform](https://atoms.smallest.ai/dashboard/agents). Refer to our [documentation](https://atoms-docs.smallest.ai/deep-dive/workflow/what-is-a-workflow) for learning more extensively.
|
|
213
|
+
|
|
214
|
+

|
|
215
|
+
|
|
216
|
+
### Provisioning bulk calling using campaigns
|
|
217
|
+
|
|
218
|
+
To manage bulk calls, you can use [Atoms platform](https://atoms.smallest.ai/dashboard/audience) to create [audience](https://atoms-docs.smallest.ai/deep-dive/audience/audience) (collection of contacts) and then configure [campaigns](https://atoms-docs.smallest.ai/deep-dive/campaign/campaign) to run.
|
|
219
|
+
|
|
220
|
+
## Getting started with Waves
|
|
234
221
|
|
|
235
222
|
### Best Practices for Input Text
|
|
236
223
|
|
|
@@ -17,7 +17,7 @@ smallestai/atoms/api/logs_api.py,sha256=1sojnF-08zKtMxSpcHOdentghj-1JoPqWTXH4cWb
|
|
|
17
17
|
smallestai/atoms/api/organization_api.py,sha256=Bduw_YTK6ioHKE8HTqbRVp7d_ZbDu7loXYprLSHqCrU,10608
|
|
18
18
|
smallestai/atoms/api/user_api.py,sha256=76zvKzMYCmROs_HQWAq0S0XCfzNB5Yf1GIzdeS60eEM,10562
|
|
19
19
|
smallestai/atoms/models/__init__.py,sha256=s5DxDG3njaXD34bQsdm3Qo31PwBaO79MtpNTcnQvP7A,5787
|
|
20
|
-
smallestai/atoms/models/agent_dto.py,sha256=
|
|
20
|
+
smallestai/atoms/models/agent_dto.py,sha256=7lp9fbBKrfnWolyXT2K_xIB7QI_HIHo7vcwP_fcjvEM,5872
|
|
21
21
|
smallestai/atoms/models/agent_dto_language.py,sha256=6NQs9kVvWz0imE01mdWwwyLTnmeRsnUezJhkdKOnhbw,2934
|
|
22
22
|
smallestai/atoms/models/agent_dto_synthesizer.py,sha256=wlrnKMN3kF5azpfH-tmfuAKEPqwI7u7Ejoi7CL-eGw8,3850
|
|
23
23
|
smallestai/atoms/models/agent_dto_synthesizer_voice_config.py,sha256=zebSoOTv_u11POqKHM3WreKYWqr7QxGcMzLeINerkRo,3786
|
|
@@ -25,13 +25,10 @@ smallestai/atoms/models/api_response.py,sha256=2eCfbeDCg695blD8QKVacK1mwPIQC_0qX
|
|
|
25
25
|
smallestai/atoms/models/bad_request_error_response.py,sha256=zkgU6NeDxddUzhAV0FunTRWrYsh6ex5HF_AuN_UuQhA,2614
|
|
26
26
|
smallestai/atoms/models/create_agent_from_template200_response.py,sha256=sgbUaQort1kw2uiiVZFQ6orqQioA2M0hNaMPP8KCLbI,2709
|
|
27
27
|
smallestai/atoms/models/create_agent_from_template_request.py,sha256=P-UOKqf-otmUoIhscdCKo1oSFFEsRQ21Ar1hy_BFt04,3067
|
|
28
|
-
smallestai/atoms/models/create_agent_request.py,sha256=
|
|
28
|
+
smallestai/atoms/models/create_agent_request.py,sha256=794_Vgt8CMvlE_qwYvoQi5EF0OgIGLA5aS9qxrgFMzQ,4904
|
|
29
29
|
smallestai/atoms/models/create_agent_request_language.py,sha256=cZpex3ZXlMfYKYW1L8oLrlhsk94OX8ChXhXtTrU-a-g,5126
|
|
30
30
|
smallestai/atoms/models/create_agent_request_language_synthesizer.py,sha256=vupUNUwECH4CUql5yLEY4KdD6Ebcm6wqjg_xpEKClXs,4944
|
|
31
31
|
smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py,sha256=2BiCvOWmkbSTm0STn9Hjw30EMDRZ9jAxZ-8HRza83zA,6636
|
|
32
|
-
smallestai/atoms/models/create_campaign200_response.py,sha256=zQyHb2r7A8EyRTMc2X7xVg_exGGLpLGvEYu2RfgcME4,2947
|
|
33
|
-
smallestai/atoms/models/create_campaign200_response_data.py,sha256=8pYT2O-sPyuz7tvLQE5yIfoLdhbB5IxfK0EA7ABkEqA,4302
|
|
34
|
-
smallestai/atoms/models/create_campaign200_response_inner.py,sha256=2HcU5wlCs2y5rpIhj-Fil3gvhFMkGFrJKfAyV85p8MY,4306
|
|
35
32
|
smallestai/atoms/models/create_campaign201_response.py,sha256=RQx7y-VSzAs1mdKt4FxayYWTXnXjE2YcbAQRkwG_ip8,2947
|
|
36
33
|
smallestai/atoms/models/create_campaign201_response_data.py,sha256=L5nw5MRREPh9wMAHyyZ5HCuwqlYHpTSZvn5fggRfcHY,4106
|
|
37
34
|
smallestai/atoms/models/create_campaign_request.py,sha256=SZHMqJLxgXINA2t4kBcz_AzY-Henm0YwSPb_t1Fkr80,2993
|
|
@@ -44,14 +41,12 @@ smallestai/atoms/models/get_agent_templates200_response_data_inner.py,sha256=9Ju
|
|
|
44
41
|
smallestai/atoms/models/get_agents200_response.py,sha256=n-eCwPRkqe0xNoYn8ZMBCYfN3bFvGIozbUJTMHrXL24,2907
|
|
45
42
|
smallestai/atoms/models/get_agents200_response_data.py,sha256=TCxAELpPdsaqNoq3PyQp4W_r_f9dhV_uGeX8YbyFBAw,3580
|
|
46
43
|
smallestai/atoms/models/get_campaign_by_id200_response.py,sha256=OyjuzVcL3fcxOau6CqfBS4LrqxyMg0iMSJYJzIhTDbA,2957
|
|
47
|
-
smallestai/atoms/models/get_campaign_by_id200_response_data.py,sha256=
|
|
44
|
+
smallestai/atoms/models/get_campaign_by_id200_response_data.py,sha256=uP1t4QXPsVo-iU44kZvs4uAu8fy7XUCDY6aLPTvLZ-I,4802
|
|
48
45
|
smallestai/atoms/models/get_campaigns200_response.py,sha256=E5GJUwZJSx65ko-DNwK3PGDVUJ49Z7t5V6qQ6oPdzE4,3134
|
|
49
46
|
smallestai/atoms/models/get_campaigns200_response_data_inner.py,sha256=9PVbplsKyCk1TVBQh8XbzQKgfCV1DR7qckiyR5N151s,5409
|
|
50
47
|
smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py,sha256=zzJ6gK8ug44xQgFYecSBMV4FZ5fJ0a9j-KPJQnxmGrQ,2752
|
|
51
48
|
smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py,sha256=OW8PRKI5dKX2fHgTtqpezE-SbrsN13kvB5tqNgjY58U,2770
|
|
52
49
|
smallestai/atoms/models/get_campaigns_request.py,sha256=1tB18zGHiL3M3Yczz1AbCZdrV0POrV07qij3tcbeMTs,2812
|
|
53
|
-
smallestai/atoms/models/get_conversation200_response.py,sha256=XrpU7r2VSzvpdZQy7HCRtQwxRk9sRiM6L6DOvB1FAm4,2955
|
|
54
|
-
smallestai/atoms/models/get_conversation200_response_data.py,sha256=DccoFEcl1vgUsEsR87kzli7SpbKYz_VZPG8C2I-5ZTk,5538
|
|
55
50
|
smallestai/atoms/models/get_conversation_logs200_response.py,sha256=H-6PF1xoTiOGVQLgzY-wNWsx5tZmT-K3t6buL9JEMoQ,2988
|
|
56
51
|
smallestai/atoms/models/get_conversation_logs200_response_data.py,sha256=zzqJXer4nLxLkfX2SPYQVs7PSo8NxQ07MWkMDyZZR0o,5554
|
|
57
52
|
smallestai/atoms/models/get_current_user200_response.py,sha256=rtevZM7dONTycqlP03uKzMAW9AeIdUw_zxR1pUJ3GW0,2948
|
|
@@ -71,7 +66,7 @@ smallestai/atoms/models/start_outbound_call200_response_data.py,sha256=o2knQgPpb
|
|
|
71
66
|
smallestai/atoms/models/start_outbound_call_request.py,sha256=hAb7KYLJlA5FzAcA4v5_JBBua4pj5FvdvmLroKP-wgg,2745
|
|
72
67
|
smallestai/atoms/models/unauthorized_error_reponse.py,sha256=TVV4SKcvCelKOsbKXTa3rL-pSHbMfKk3QZN6bSu1tgE,2618
|
|
73
68
|
smallestai/atoms/models/update_agent200_response.py,sha256=Kj0uArlKlbKT2tbgKQ4caPYWn2y4fCDwF6fuyIFutfE,2661
|
|
74
|
-
smallestai/atoms/models/update_agent_request.py,sha256=
|
|
69
|
+
smallestai/atoms/models/update_agent_request.py,sha256=Mxy8Ij9wJ8xOkeKFplOaRe1-8onLwbezSUr9R44ntuE,5051
|
|
75
70
|
smallestai/atoms/models/update_agent_request_language.py,sha256=r4mEtJhbfwA-bBcMR4nfpT9qF732kXQh31ZfWVdzpUY,3419
|
|
76
71
|
smallestai/atoms/models/update_agent_request_synthesizer.py,sha256=2fRr23rZTWZegn4bCpGkt0RyoEHRAXA5LaNPFPYRtAo,4887
|
|
77
72
|
smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py,sha256=txpS5fLeD0W1mNPj6gB5P3dNs_okEkBxZ9DWvZrvUs0,6572
|
|
@@ -85,8 +80,8 @@ smallestai/waves/models.py,sha256=g2e_4nU5P48vyXZandKLWqZC1TkoEGeLvYKqJIqurSI,83
|
|
|
85
80
|
smallestai/waves/stream_tts.py,sha256=Ppjwp1jXpUSpyNkwCnesMYQbAdyzKLMj_1o1iTb3jaA,10958
|
|
86
81
|
smallestai/waves/utils.py,sha256=pyKx-JM6W112CJ_VvSVGqtlwKT6x2FOWp7X7DcHruXg,3365
|
|
87
82
|
smallestai/waves/waves_client.py,sha256=XKdPVWs-HZDzlxzF1x3cMdJQ_q71ZFS1P5oltzj2KO4,10740
|
|
88
|
-
smallestai-3.0.
|
|
89
|
-
smallestai-3.0.
|
|
90
|
-
smallestai-3.0.
|
|
91
|
-
smallestai-3.0.
|
|
92
|
-
smallestai-3.0.
|
|
83
|
+
smallestai-3.0.1.dist-info/licenses/LICENSE,sha256=kK3HNKhN7luQhkjkNWIvy9_gizbEDUM4mSv_HWq9uuM,1068
|
|
84
|
+
smallestai-3.0.1.dist-info/METADATA,sha256=mGthsmmMQVRXsN4CBqlxB7OunGSPFls8IAgVBXMuM3s,20392
|
|
85
|
+
smallestai-3.0.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
86
|
+
smallestai-3.0.1.dist-info/top_level.txt,sha256=pdJzm1VC2J6RxoobATz45L9U3cki4AFLigsfvETz7Io,11
|
|
87
|
+
smallestai-3.0.1.dist-info/RECORD,,
|
|
@@ -1,93 +0,0 @@
|
|
|
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
|
-
|
|
15
|
-
from __future__ import annotations
|
|
16
|
-
import pprint
|
|
17
|
-
import re # noqa: F401
|
|
18
|
-
import json
|
|
19
|
-
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictBool
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from smallestai.atoms.models.create_campaign200_response_data import CreateCampaign200ResponseData
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class CreateCampaign200Response(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
CreateCampaign200Response
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
status: Optional[StrictBool] = None
|
|
31
|
-
data: Optional[CreateCampaign200ResponseData] = None
|
|
32
|
-
__properties: ClassVar[List[str]] = ["status", "data"]
|
|
33
|
-
|
|
34
|
-
model_config = ConfigDict(
|
|
35
|
-
populate_by_name=True,
|
|
36
|
-
validate_assignment=True,
|
|
37
|
-
protected_namespaces=(),
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def to_str(self) -> str:
|
|
42
|
-
"""Returns the string representation of the model using alias"""
|
|
43
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
-
|
|
45
|
-
def to_json(self) -> str:
|
|
46
|
-
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
-
|
|
50
|
-
@classmethod
|
|
51
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of CreateCampaign200Response from a JSON string"""
|
|
53
|
-
return cls.from_dict(json.loads(json_str))
|
|
54
|
-
|
|
55
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
-
"""Return the dictionary representation of the model using alias.
|
|
57
|
-
|
|
58
|
-
This has the following differences from calling pydantic's
|
|
59
|
-
`self.model_dump(by_alias=True)`:
|
|
60
|
-
|
|
61
|
-
* `None` is only added to the output dict for nullable fields that
|
|
62
|
-
were set at model initialization. Other fields with value `None`
|
|
63
|
-
are ignored.
|
|
64
|
-
"""
|
|
65
|
-
excluded_fields: Set[str] = set([
|
|
66
|
-
])
|
|
67
|
-
|
|
68
|
-
_dict = self.model_dump(
|
|
69
|
-
by_alias=True,
|
|
70
|
-
exclude=excluded_fields,
|
|
71
|
-
exclude_none=True,
|
|
72
|
-
)
|
|
73
|
-
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
|
-
if self.data:
|
|
75
|
-
_dict['data'] = self.data.to_dict()
|
|
76
|
-
return _dict
|
|
77
|
-
|
|
78
|
-
@classmethod
|
|
79
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of CreateCampaign200Response from a dict"""
|
|
81
|
-
if obj is None:
|
|
82
|
-
return None
|
|
83
|
-
|
|
84
|
-
if not isinstance(obj, dict):
|
|
85
|
-
return cls.model_validate(obj)
|
|
86
|
-
|
|
87
|
-
_obj = cls.model_validate({
|
|
88
|
-
"status": obj.get("status"),
|
|
89
|
-
"data": CreateCampaign200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
90
|
-
})
|
|
91
|
-
return _obj
|
|
92
|
-
|
|
93
|
-
|
|
@@ -1,106 +0,0 @@
|
|
|
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
|
-
|
|
15
|
-
from __future__ import annotations
|
|
16
|
-
import pprint
|
|
17
|
-
import re # noqa: F401
|
|
18
|
-
import json
|
|
19
|
-
|
|
20
|
-
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class CreateCampaign200ResponseData(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
CreateCampaign200ResponseData
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
id: Optional[StrictStr] = Field(default=None, description="The unique identifier for the campaign", alias="_id")
|
|
31
|
-
name: Optional[StrictStr] = Field(default=None, description="The name of the campaign")
|
|
32
|
-
description: Optional[StrictStr] = Field(default=None, description="The description of the campaign")
|
|
33
|
-
organization: Optional[StrictStr] = Field(default=None, description="The ID of the organization")
|
|
34
|
-
agent_id: Optional[StrictStr] = Field(default=None, description="The ID of the agent", alias="agentId")
|
|
35
|
-
created_by: Optional[StrictStr] = Field(default=None, description="The ID of the user who created the campaign", alias="createdBy")
|
|
36
|
-
audience_id: Optional[StrictStr] = Field(default=None, description="The ID of the audience", alias="audienceId")
|
|
37
|
-
participants_count: Optional[StrictInt] = Field(default=None, description="The number of participants in the campaign", alias="participantsCount")
|
|
38
|
-
created_at: Optional[datetime] = Field(default=None, description="The date and time when the campaign was created", alias="createdAt")
|
|
39
|
-
updated_at: Optional[datetime] = Field(default=None, description="The date and time when the campaign was last updated", alias="updatedAt")
|
|
40
|
-
__properties: ClassVar[List[str]] = ["_id", "name", "description", "organization", "agentId", "createdBy", "audienceId", "participantsCount", "createdAt", "updatedAt"]
|
|
41
|
-
|
|
42
|
-
model_config = ConfigDict(
|
|
43
|
-
populate_by_name=True,
|
|
44
|
-
validate_assignment=True,
|
|
45
|
-
protected_namespaces=(),
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def to_str(self) -> str:
|
|
50
|
-
"""Returns the string representation of the model using alias"""
|
|
51
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
-
|
|
53
|
-
def to_json(self) -> str:
|
|
54
|
-
"""Returns the JSON representation of the model using alias"""
|
|
55
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
-
return json.dumps(self.to_dict())
|
|
57
|
-
|
|
58
|
-
@classmethod
|
|
59
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
-
"""Create an instance of CreateCampaign200ResponseData from a JSON string"""
|
|
61
|
-
return cls.from_dict(json.loads(json_str))
|
|
62
|
-
|
|
63
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
-
"""Return the dictionary representation of the model using alias.
|
|
65
|
-
|
|
66
|
-
This has the following differences from calling pydantic's
|
|
67
|
-
`self.model_dump(by_alias=True)`:
|
|
68
|
-
|
|
69
|
-
* `None` is only added to the output dict for nullable fields that
|
|
70
|
-
were set at model initialization. Other fields with value `None`
|
|
71
|
-
are ignored.
|
|
72
|
-
"""
|
|
73
|
-
excluded_fields: Set[str] = set([
|
|
74
|
-
])
|
|
75
|
-
|
|
76
|
-
_dict = self.model_dump(
|
|
77
|
-
by_alias=True,
|
|
78
|
-
exclude=excluded_fields,
|
|
79
|
-
exclude_none=True,
|
|
80
|
-
)
|
|
81
|
-
return _dict
|
|
82
|
-
|
|
83
|
-
@classmethod
|
|
84
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
-
"""Create an instance of CreateCampaign200ResponseData from a dict"""
|
|
86
|
-
if obj is None:
|
|
87
|
-
return None
|
|
88
|
-
|
|
89
|
-
if not isinstance(obj, dict):
|
|
90
|
-
return cls.model_validate(obj)
|
|
91
|
-
|
|
92
|
-
_obj = cls.model_validate({
|
|
93
|
-
"_id": obj.get("_id"),
|
|
94
|
-
"name": obj.get("name"),
|
|
95
|
-
"description": obj.get("description"),
|
|
96
|
-
"organization": obj.get("organization"),
|
|
97
|
-
"agentId": obj.get("agentId"),
|
|
98
|
-
"createdBy": obj.get("createdBy"),
|
|
99
|
-
"audienceId": obj.get("audienceId"),
|
|
100
|
-
"participantsCount": obj.get("participantsCount"),
|
|
101
|
-
"createdAt": obj.get("createdAt"),
|
|
102
|
-
"updatedAt": obj.get("updatedAt")
|
|
103
|
-
})
|
|
104
|
-
return _obj
|
|
105
|
-
|
|
106
|
-
|
|
@@ -1,106 +0,0 @@
|
|
|
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
|
-
|
|
15
|
-
from __future__ import annotations
|
|
16
|
-
import pprint
|
|
17
|
-
import re # noqa: F401
|
|
18
|
-
import json
|
|
19
|
-
|
|
20
|
-
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class CreateCampaign200ResponseInner(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
CreateCampaign200ResponseInner
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
id: Optional[StrictStr] = Field(default=None, description="The unique identifier for the campaign", alias="_id")
|
|
31
|
-
name: Optional[StrictStr] = Field(default=None, description="The name of the campaign")
|
|
32
|
-
description: Optional[StrictStr] = Field(default=None, description="The description of the campaign")
|
|
33
|
-
organization: Optional[StrictStr] = Field(default=None, description="The ID of the organization")
|
|
34
|
-
agent_id: Optional[StrictStr] = Field(default=None, description="The ID of the agent", alias="agentId")
|
|
35
|
-
created_by: Optional[StrictStr] = Field(default=None, description="The ID of the user who created the campaign", alias="createdBy")
|
|
36
|
-
audience_id: Optional[StrictStr] = Field(default=None, description="The ID of the audience", alias="audienceId")
|
|
37
|
-
participants_count: Optional[StrictInt] = Field(default=None, description="The number of participants in the campaign", alias="participantsCount")
|
|
38
|
-
created_at: Optional[datetime] = Field(default=None, description="The date and time when the campaign was created", alias="createdAt")
|
|
39
|
-
updated_at: Optional[datetime] = Field(default=None, description="The date and time when the campaign was last updated", alias="updatedAt")
|
|
40
|
-
__properties: ClassVar[List[str]] = ["_id", "name", "description", "organization", "agentId", "createdBy", "audienceId", "participantsCount", "createdAt", "updatedAt"]
|
|
41
|
-
|
|
42
|
-
model_config = ConfigDict(
|
|
43
|
-
populate_by_name=True,
|
|
44
|
-
validate_assignment=True,
|
|
45
|
-
protected_namespaces=(),
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def to_str(self) -> str:
|
|
50
|
-
"""Returns the string representation of the model using alias"""
|
|
51
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
-
|
|
53
|
-
def to_json(self) -> str:
|
|
54
|
-
"""Returns the JSON representation of the model using alias"""
|
|
55
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
-
return json.dumps(self.to_dict())
|
|
57
|
-
|
|
58
|
-
@classmethod
|
|
59
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
-
"""Create an instance of CreateCampaign200ResponseInner from a JSON string"""
|
|
61
|
-
return cls.from_dict(json.loads(json_str))
|
|
62
|
-
|
|
63
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
-
"""Return the dictionary representation of the model using alias.
|
|
65
|
-
|
|
66
|
-
This has the following differences from calling pydantic's
|
|
67
|
-
`self.model_dump(by_alias=True)`:
|
|
68
|
-
|
|
69
|
-
* `None` is only added to the output dict for nullable fields that
|
|
70
|
-
were set at model initialization. Other fields with value `None`
|
|
71
|
-
are ignored.
|
|
72
|
-
"""
|
|
73
|
-
excluded_fields: Set[str] = set([
|
|
74
|
-
])
|
|
75
|
-
|
|
76
|
-
_dict = self.model_dump(
|
|
77
|
-
by_alias=True,
|
|
78
|
-
exclude=excluded_fields,
|
|
79
|
-
exclude_none=True,
|
|
80
|
-
)
|
|
81
|
-
return _dict
|
|
82
|
-
|
|
83
|
-
@classmethod
|
|
84
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
-
"""Create an instance of CreateCampaign200ResponseInner from a dict"""
|
|
86
|
-
if obj is None:
|
|
87
|
-
return None
|
|
88
|
-
|
|
89
|
-
if not isinstance(obj, dict):
|
|
90
|
-
return cls.model_validate(obj)
|
|
91
|
-
|
|
92
|
-
_obj = cls.model_validate({
|
|
93
|
-
"_id": obj.get("_id"),
|
|
94
|
-
"name": obj.get("name"),
|
|
95
|
-
"description": obj.get("description"),
|
|
96
|
-
"organization": obj.get("organization"),
|
|
97
|
-
"agentId": obj.get("agentId"),
|
|
98
|
-
"createdBy": obj.get("createdBy"),
|
|
99
|
-
"audienceId": obj.get("audienceId"),
|
|
100
|
-
"participantsCount": obj.get("participantsCount"),
|
|
101
|
-
"createdAt": obj.get("createdAt"),
|
|
102
|
-
"updatedAt": obj.get("updatedAt")
|
|
103
|
-
})
|
|
104
|
-
return _obj
|
|
105
|
-
|
|
106
|
-
|
|
@@ -1,93 +0,0 @@
|
|
|
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
|
-
|
|
15
|
-
from __future__ import annotations
|
|
16
|
-
import pprint
|
|
17
|
-
import re # noqa: F401
|
|
18
|
-
import json
|
|
19
|
-
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictBool
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from smallestai.atoms.models.get_conversation200_response_data import GetConversation200ResponseData
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class GetConversation200Response(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
GetConversation200Response
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
status: Optional[StrictBool] = None
|
|
31
|
-
data: Optional[GetConversation200ResponseData] = None
|
|
32
|
-
__properties: ClassVar[List[str]] = ["status", "data"]
|
|
33
|
-
|
|
34
|
-
model_config = ConfigDict(
|
|
35
|
-
populate_by_name=True,
|
|
36
|
-
validate_assignment=True,
|
|
37
|
-
protected_namespaces=(),
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def to_str(self) -> str:
|
|
42
|
-
"""Returns the string representation of the model using alias"""
|
|
43
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
-
|
|
45
|
-
def to_json(self) -> str:
|
|
46
|
-
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
-
|
|
50
|
-
@classmethod
|
|
51
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of GetConversation200Response from a JSON string"""
|
|
53
|
-
return cls.from_dict(json.loads(json_str))
|
|
54
|
-
|
|
55
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
-
"""Return the dictionary representation of the model using alias.
|
|
57
|
-
|
|
58
|
-
This has the following differences from calling pydantic's
|
|
59
|
-
`self.model_dump(by_alias=True)`:
|
|
60
|
-
|
|
61
|
-
* `None` is only added to the output dict for nullable fields that
|
|
62
|
-
were set at model initialization. Other fields with value `None`
|
|
63
|
-
are ignored.
|
|
64
|
-
"""
|
|
65
|
-
excluded_fields: Set[str] = set([
|
|
66
|
-
])
|
|
67
|
-
|
|
68
|
-
_dict = self.model_dump(
|
|
69
|
-
by_alias=True,
|
|
70
|
-
exclude=excluded_fields,
|
|
71
|
-
exclude_none=True,
|
|
72
|
-
)
|
|
73
|
-
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
|
-
if self.data:
|
|
75
|
-
_dict['data'] = self.data.to_dict()
|
|
76
|
-
return _dict
|
|
77
|
-
|
|
78
|
-
@classmethod
|
|
79
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of GetConversation200Response from a dict"""
|
|
81
|
-
if obj is None:
|
|
82
|
-
return None
|
|
83
|
-
|
|
84
|
-
if not isinstance(obj, dict):
|
|
85
|
-
return cls.model_validate(obj)
|
|
86
|
-
|
|
87
|
-
_obj = cls.model_validate({
|
|
88
|
-
"status": obj.get("status"),
|
|
89
|
-
"data": GetConversation200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
90
|
-
})
|
|
91
|
-
return _obj
|
|
92
|
-
|
|
93
|
-
|
|
@@ -1,125 +0,0 @@
|
|
|
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
|
-
|
|
15
|
-
from __future__ import annotations
|
|
16
|
-
import pprint
|
|
17
|
-
import re # noqa: F401
|
|
18
|
-
import json
|
|
19
|
-
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
-
from smallestai.atoms.models.agent_dto import AgentDTO
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class GetConversation200ResponseData(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
GetConversation200ResponseData
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
id: Optional[StrictStr] = Field(default=None, description="The ID of the conversation", alias="_id")
|
|
31
|
-
call_id: Optional[StrictStr] = Field(default=None, description="The ID of the conversation", alias="callId")
|
|
32
|
-
agent: Optional[AgentDTO] = None
|
|
33
|
-
status: Optional[StrictStr] = Field(default=None, description="The status of the conversation")
|
|
34
|
-
duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The duration of the conversation in seconds")
|
|
35
|
-
recording_url: Optional[StrictStr] = Field(default=None, description="The recording URL of the conversation", alias="recordingUrl")
|
|
36
|
-
var_from: Optional[StrictStr] = Field(default=None, description="The phone number of the caller", alias="from")
|
|
37
|
-
to: Optional[StrictStr] = Field(default=None, description="The phone number of the callee")
|
|
38
|
-
transcript: Optional[List[StrictStr]] = Field(default=None, description="The transcript of the conversation")
|
|
39
|
-
average_transcriber_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The average time taken by the TTS to transcribe the conversation")
|
|
40
|
-
average_agent_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The average time taken by the LLM to respond to the conversation")
|
|
41
|
-
average_synthesizer_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The average time taken by the TTS to synthesize the conversation")
|
|
42
|
-
type: Optional[StrictStr] = Field(default=None, description="The type of the conversation")
|
|
43
|
-
__properties: ClassVar[List[str]] = ["_id", "callId", "agent", "status", "duration", "recordingUrl", "from", "to", "transcript", "average_transcriber_latency", "average_agent_latency", "average_synthesizer_latency", "type"]
|
|
44
|
-
|
|
45
|
-
@field_validator('type')
|
|
46
|
-
def type_validate_enum(cls, value):
|
|
47
|
-
"""Validates the enum"""
|
|
48
|
-
if value is None:
|
|
49
|
-
return value
|
|
50
|
-
|
|
51
|
-
if value not in set(['telephony_inbound', 'telephony_outbound', 'chat']):
|
|
52
|
-
raise ValueError("must be one of enum values ('telephony_inbound', 'telephony_outbound', 'chat')")
|
|
53
|
-
return value
|
|
54
|
-
|
|
55
|
-
model_config = ConfigDict(
|
|
56
|
-
populate_by_name=True,
|
|
57
|
-
validate_assignment=True,
|
|
58
|
-
protected_namespaces=(),
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def to_str(self) -> str:
|
|
63
|
-
"""Returns the string representation of the model using alias"""
|
|
64
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
65
|
-
|
|
66
|
-
def to_json(self) -> str:
|
|
67
|
-
"""Returns the JSON representation of the model using alias"""
|
|
68
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
69
|
-
return json.dumps(self.to_dict())
|
|
70
|
-
|
|
71
|
-
@classmethod
|
|
72
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
73
|
-
"""Create an instance of GetConversation200ResponseData from a JSON string"""
|
|
74
|
-
return cls.from_dict(json.loads(json_str))
|
|
75
|
-
|
|
76
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
77
|
-
"""Return the dictionary representation of the model using alias.
|
|
78
|
-
|
|
79
|
-
This has the following differences from calling pydantic's
|
|
80
|
-
`self.model_dump(by_alias=True)`:
|
|
81
|
-
|
|
82
|
-
* `None` is only added to the output dict for nullable fields that
|
|
83
|
-
were set at model initialization. Other fields with value `None`
|
|
84
|
-
are ignored.
|
|
85
|
-
"""
|
|
86
|
-
excluded_fields: Set[str] = set([
|
|
87
|
-
])
|
|
88
|
-
|
|
89
|
-
_dict = self.model_dump(
|
|
90
|
-
by_alias=True,
|
|
91
|
-
exclude=excluded_fields,
|
|
92
|
-
exclude_none=True,
|
|
93
|
-
)
|
|
94
|
-
# override the default output from pydantic by calling `to_dict()` of agent
|
|
95
|
-
if self.agent:
|
|
96
|
-
_dict['agent'] = self.agent.to_dict()
|
|
97
|
-
return _dict
|
|
98
|
-
|
|
99
|
-
@classmethod
|
|
100
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
101
|
-
"""Create an instance of GetConversation200ResponseData from a dict"""
|
|
102
|
-
if obj is None:
|
|
103
|
-
return None
|
|
104
|
-
|
|
105
|
-
if not isinstance(obj, dict):
|
|
106
|
-
return cls.model_validate(obj)
|
|
107
|
-
|
|
108
|
-
_obj = cls.model_validate({
|
|
109
|
-
"_id": obj.get("_id"),
|
|
110
|
-
"callId": obj.get("callId"),
|
|
111
|
-
"agent": AgentDTO.from_dict(obj["agent"]) if obj.get("agent") is not None else None,
|
|
112
|
-
"status": obj.get("status"),
|
|
113
|
-
"duration": obj.get("duration"),
|
|
114
|
-
"recordingUrl": obj.get("recordingUrl"),
|
|
115
|
-
"from": obj.get("from"),
|
|
116
|
-
"to": obj.get("to"),
|
|
117
|
-
"transcript": obj.get("transcript"),
|
|
118
|
-
"average_transcriber_latency": obj.get("average_transcriber_latency"),
|
|
119
|
-
"average_agent_latency": obj.get("average_agent_latency"),
|
|
120
|
-
"average_synthesizer_latency": obj.get("average_synthesizer_latency"),
|
|
121
|
-
"type": obj.get("type")
|
|
122
|
-
})
|
|
123
|
-
return _obj
|
|
124
|
-
|
|
125
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|