smallestai 3.1.0__py3-none-any.whl → 4.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.

Files changed (135) hide show
  1. smallestai/__init__.py +35 -45
  2. smallestai/atoms/__init__.py +249 -123
  3. smallestai/atoms/api/__init__.py +0 -1
  4. smallestai/atoms/api/agent_templates_api.py +26 -26
  5. smallestai/atoms/api/agents_api.py +1316 -190
  6. smallestai/atoms/api/calls_api.py +29 -29
  7. smallestai/atoms/api/campaigns_api.py +165 -165
  8. smallestai/atoms/api/knowledge_base_api.py +290 -290
  9. smallestai/atoms/api/logs_api.py +13 -13
  10. smallestai/atoms/api/organization_api.py +13 -13
  11. smallestai/atoms/api/user_api.py +13 -13
  12. smallestai/atoms/atoms_client.py +77 -49
  13. smallestai/atoms/models/__init__.py +103 -43
  14. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_delete200_response.py +89 -0
  15. smallestai/atoms/models/{get_agent_templates200_response.py → agent_agent_id_webhook_subscriptions_get200_response.py} +7 -7
  16. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_get404_response.py +89 -0
  17. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post201_response.py +89 -0
  18. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post400_response.py +89 -0
  19. smallestai/atoms/models/agent_agent_id_webhook_subscriptions_post_request.py +97 -0
  20. smallestai/atoms/models/agent_dto.py +8 -6
  21. smallestai/atoms/models/agent_dto_language.py +17 -3
  22. smallestai/atoms/models/agent_dto_language_switching.py +95 -0
  23. smallestai/atoms/models/agent_dto_synthesizer.py +1 -1
  24. smallestai/atoms/models/{create_agent_from_template200_response.py → agent_from_template_post200_response.py} +4 -4
  25. smallestai/atoms/models/{get_agents200_response.py → agent_get200_response.py} +7 -7
  26. smallestai/atoms/models/{get_agents200_response_data.py → agent_get200_response_data.py} +9 -13
  27. smallestai/atoms/models/{delete_agent200_response.py → agent_id_delete200_response.py} +4 -4
  28. smallestai/atoms/models/{get_agent_by_id200_response.py → agent_id_get200_response.py} +4 -4
  29. smallestai/atoms/models/{update_agent200_response.py → agent_id_patch200_response.py} +4 -4
  30. smallestai/atoms/models/{update_agent_request.py → agent_id_patch_request.py} +17 -15
  31. smallestai/atoms/models/{update_agent_request_language.py → agent_id_patch_request_language.py} +14 -10
  32. smallestai/atoms/models/agent_id_patch_request_language_switching.py +96 -0
  33. smallestai/atoms/models/{update_agent_request_synthesizer.py → agent_id_patch_request_synthesizer.py} +6 -6
  34. smallestai/atoms/models/{update_agent_request_synthesizer_voice_config.py → agent_id_patch_request_synthesizer_voice_config.py} +27 -27
  35. smallestai/atoms/models/{update_agent_request_synthesizer_voice_config_one_of.py → agent_id_patch_request_synthesizer_voice_config_one_of.py} +4 -4
  36. smallestai/atoms/models/{update_agent_request_synthesizer_voice_config_one_of1.py → agent_id_patch_request_synthesizer_voice_config_one_of1.py} +4 -4
  37. smallestai/atoms/models/{get_campaign_by_id200_response.py → agent_id_workflow_get200_response.py} +7 -7
  38. smallestai/atoms/models/agent_id_workflow_get200_response_data.py +105 -0
  39. smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner.py +127 -0
  40. smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner_data.py +91 -0
  41. smallestai/atoms/models/agent_id_workflow_get200_response_data_edges_inner_marker_end.py +91 -0
  42. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner.py +114 -0
  43. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data.py +115 -0
  44. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data_variables.py +97 -0
  45. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_data_variables_data_inner.py +91 -0
  46. smallestai/atoms/models/agent_id_workflow_get200_response_data_nodes_inner_position.py +89 -0
  47. smallestai/atoms/models/agent_id_workflow_get404_response.py +89 -0
  48. smallestai/atoms/models/agent_template_get200_response.py +97 -0
  49. smallestai/atoms/models/{get_agent_templates200_response_data_inner.py → agent_template_get200_response_data_inner.py} +6 -6
  50. smallestai/atoms/models/{get_campaigns200_response.py → audience_get200_response.py} +7 -7
  51. smallestai/atoms/models/{create_campaign201_response_data.py → audience_get200_response_data_inner.py} +16 -18
  52. smallestai/atoms/models/audience_id_delete200_response.py +89 -0
  53. smallestai/atoms/models/audience_id_delete400_response.py +89 -0
  54. smallestai/atoms/models/{get_current_user200_response.py → audience_id_get200_response.py} +7 -7
  55. smallestai/atoms/models/audience_id_get400_response.py +89 -0
  56. smallestai/atoms/models/audience_id_get403_response.py +89 -0
  57. smallestai/atoms/models/audience_id_get404_response.py +89 -0
  58. smallestai/atoms/models/audience_id_members_delete200_response.py +93 -0
  59. smallestai/atoms/models/audience_id_members_delete200_response_data.py +87 -0
  60. smallestai/atoms/models/audience_id_members_delete_request.py +87 -0
  61. smallestai/atoms/models/audience_id_members_get200_response.py +93 -0
  62. smallestai/atoms/models/audience_id_members_get200_response_data.py +101 -0
  63. smallestai/atoms/models/{get_campaigns200_response_data_inner_audience.py → audience_id_members_get200_response_data_members_inner.py} +8 -8
  64. smallestai/atoms/models/audience_id_members_get400_response.py +89 -0
  65. smallestai/atoms/models/audience_id_members_get500_response.py +89 -0
  66. smallestai/atoms/models/audience_id_members_post200_response.py +97 -0
  67. smallestai/atoms/models/audience_id_members_post200_response_data_inner.py +93 -0
  68. smallestai/atoms/models/audience_id_members_post200_response_data_inner_data.py +89 -0
  69. smallestai/atoms/models/audience_id_members_post400_response.py +89 -0
  70. smallestai/atoms/models/audience_id_members_post403_response.py +89 -0
  71. smallestai/atoms/models/audience_id_members_post_request.py +87 -0
  72. smallestai/atoms/models/audience_id_members_search_get200_response.py +93 -0
  73. smallestai/atoms/models/audience_id_members_search_get200_response_data.py +101 -0
  74. smallestai/atoms/models/audience_id_members_search_get200_response_data_search_info.py +103 -0
  75. smallestai/atoms/models/audience_id_members_search_get400_response.py +89 -0
  76. smallestai/atoms/models/audience_id_members_search_get500_response.py +89 -0
  77. smallestai/atoms/models/{create_campaign201_response.py → audience_post200_response.py} +7 -7
  78. smallestai/atoms/models/audience_post200_response_data.py +104 -0
  79. smallestai/atoms/models/audience_post400_response.py +89 -0
  80. smallestai/atoms/models/campaign_get200_response.py +93 -0
  81. smallestai/atoms/models/campaign_get200_response_data.py +87 -0
  82. smallestai/atoms/models/{get_campaigns_request.py → campaign_get_request.py} +4 -4
  83. smallestai/atoms/models/campaign_id_get200_response.py +93 -0
  84. smallestai/atoms/models/{get_campaign_by_id200_response_data.py → campaign_id_get200_response_data.py} +4 -4
  85. smallestai/atoms/models/campaign_post201_response.py +89 -0
  86. smallestai/atoms/models/{create_campaign_request.py → campaign_post_request.py} +4 -4
  87. smallestai/atoms/models/{start_outbound_call200_response.py → conversation_id_get200_response.py} +7 -7
  88. smallestai/atoms/models/{get_conversation_logs200_response_data.py → conversation_id_get200_response_data.py} +4 -4
  89. smallestai/atoms/models/conversation_outbound_post200_response.py +93 -0
  90. smallestai/atoms/models/{start_outbound_call200_response_data.py → conversation_outbound_post200_response_data.py} +4 -4
  91. smallestai/atoms/models/{start_outbound_call_request.py → conversation_outbound_post_request.py} +4 -4
  92. smallestai/atoms/models/create_agent_request.py +10 -6
  93. smallestai/atoms/models/create_agent_request_language.py +11 -7
  94. smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +24 -24
  95. smallestai/atoms/models/{knowledge_base_dto.py → knowledge_base.py} +15 -8
  96. smallestai/atoms/models/{knowledge_base_item_dto.py → knowledge_base_item.py} +19 -17
  97. smallestai/atoms/models/{get_knowledge_bases200_response.py → knowledgebase_get200_response.py} +7 -7
  98. smallestai/atoms/models/{get_knowledge_base_by_id200_response.py → knowledgebase_id_get200_response.py} +7 -7
  99. smallestai/atoms/models/{get_knowledge_base_items200_response.py → knowledgebase_id_items_get200_response.py} +7 -7
  100. smallestai/atoms/models/{upload_text_to_knowledge_base_request.py → knowledgebase_id_items_upload_text_post_request.py} +4 -4
  101. smallestai/atoms/models/{create_knowledge_base201_response.py → knowledgebase_post201_response.py} +4 -4
  102. smallestai/atoms/models/{create_knowledge_base_request.py → knowledgebase_post_request.py} +4 -4
  103. smallestai/atoms/models/{get_organization200_response.py → organization_get200_response.py} +7 -7
  104. smallestai/atoms/models/{get_organization200_response_data.py → organization_get200_response_data.py} +10 -10
  105. smallestai/atoms/models/{get_organization200_response_data_members_inner.py → organization_get200_response_data_members_inner.py} +4 -4
  106. smallestai/atoms/models/{get_organization200_response_data_subscription.py → organization_get200_response_data_subscription.py} +4 -4
  107. smallestai/atoms/models/product_phone_numbers_get200_response.py +97 -0
  108. smallestai/atoms/models/product_phone_numbers_get200_response_data_inner.py +100 -0
  109. smallestai/atoms/models/product_phone_numbers_get200_response_data_inner_attributes.py +89 -0
  110. smallestai/atoms/models/user_get200_response.py +93 -0
  111. smallestai/atoms/models/{get_current_user200_response_data.py → user_get200_response_data.py} +4 -4
  112. smallestai/atoms/models/webhook.py +124 -0
  113. smallestai/atoms/models/{get_campaigns200_response_data_inner_agent.py → webhook_agent.py} +8 -6
  114. smallestai/atoms/models/webhook_event.py +98 -0
  115. smallestai/atoms/models/webhook_get200_response.py +93 -0
  116. smallestai/atoms/models/webhook_get200_response_data.py +140 -0
  117. smallestai/atoms/models/webhook_id_delete404_response.py +89 -0
  118. smallestai/atoms/models/webhook_post201_response.py +89 -0
  119. smallestai/atoms/models/webhook_post_request.py +99 -0
  120. smallestai/atoms/models/webhook_post_request_events_inner.py +99 -0
  121. smallestai/atoms/models/webhook_subscription.py +108 -0
  122. smallestai/atoms/models/webhook_subscription_populated.py +112 -0
  123. smallestai/waves/__init__.py +2 -2
  124. smallestai/waves/async_waves_client.py +42 -69
  125. smallestai/waves/stream_tts.py +189 -254
  126. smallestai/waves/utils.py +3 -49
  127. smallestai/waves/waves_client.py +41 -69
  128. {smallestai-3.1.0.dist-info → smallestai-4.0.1.dist-info}/METADATA +3 -2
  129. smallestai-4.0.1.dist-info/RECORD +147 -0
  130. {smallestai-3.1.0.dist-info → smallestai-4.0.1.dist-info}/WHEEL +1 -1
  131. smallestai/atoms/models/get_campaigns200_response_data_inner.py +0 -118
  132. smallestai/atoms/models/get_conversation_logs200_response.py +0 -93
  133. smallestai-3.1.0.dist-info/RECORD +0 -87
  134. {smallestai-3.1.0.dist-info → smallestai-4.0.1.dist-info}/licenses/LICENSE +0 -0
  135. {smallestai-3.1.0.dist-info → smallestai-4.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,87 @@
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class CampaignGet200ResponseData(BaseModel):
26
+ """
27
+ CampaignGet200ResponseData
28
+ """ # noqa: E501
29
+ campaigns: Optional[List[Dict[str, Any]]] = None
30
+ __properties: ClassVar[List[str]] = ["campaigns"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of CampaignGet200ResponseData from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of CampaignGet200ResponseData from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "campaigns": obj.get("campaigns")
84
+ })
85
+ return _obj
86
+
87
+
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class GetCampaignsRequest(BaseModel):
25
+ class CampaignGetRequest(BaseModel):
26
26
  """
27
- GetCampaignsRequest
27
+ CampaignGetRequest
28
28
  """ # noqa: E501
29
29
  page: Optional[Union[StrictFloat, StrictInt]] = Field(default=1, description="The page number")
30
30
  limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=10, description="The number of items per page")
@@ -48,7 +48,7 @@ class GetCampaignsRequest(BaseModel):
48
48
 
49
49
  @classmethod
50
50
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of GetCampaignsRequest from a JSON string"""
51
+ """Create an instance of CampaignGetRequest from a JSON string"""
52
52
  return cls.from_dict(json.loads(json_str))
53
53
 
54
54
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +73,7 @@ class GetCampaignsRequest(BaseModel):
73
73
 
74
74
  @classmethod
75
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of GetCampaignsRequest from a dict"""
76
+ """Create an instance of CampaignGetRequest from a dict"""
77
77
  if obj is None:
78
78
  return None
79
79
 
@@ -0,0 +1,93 @@
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.campaign_id_get200_response_data import CampaignIdGet200ResponseData
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class CampaignIdGet200Response(BaseModel):
27
+ """
28
+ CampaignIdGet200Response
29
+ """ # noqa: E501
30
+ status: Optional[StrictBool] = None
31
+ data: Optional[CampaignIdGet200ResponseData] = 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 CampaignIdGet200Response 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 CampaignIdGet200Response 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": CampaignIdGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -23,9 +23,9 @@ from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class GetCampaignById200ResponseData(BaseModel):
26
+ class CampaignIdGet200ResponseData(BaseModel):
27
27
  """
28
- GetCampaignById200ResponseData
28
+ CampaignIdGet200ResponseData
29
29
  """ # noqa: E501
30
30
  id: Optional[StrictStr] = Field(default=None, description="The unique identifier for the campaign", alias="_id")
31
31
  name: Optional[StrictStr] = Field(default=None, description="The name of the campaign")
@@ -59,7 +59,7 @@ class GetCampaignById200ResponseData(BaseModel):
59
59
 
60
60
  @classmethod
61
61
  def from_json(cls, json_str: str) -> Optional[Self]:
62
- """Create an instance of GetCampaignById200ResponseData from a JSON string"""
62
+ """Create an instance of CampaignIdGet200ResponseData from a JSON string"""
63
63
  return cls.from_dict(json.loads(json_str))
64
64
 
65
65
  def to_dict(self) -> Dict[str, Any]:
@@ -84,7 +84,7 @@ class GetCampaignById200ResponseData(BaseModel):
84
84
 
85
85
  @classmethod
86
86
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
- """Create an instance of GetCampaignById200ResponseData from a dict"""
87
+ """Create an instance of CampaignIdGet200ResponseData from a dict"""
88
88
  if obj is None:
89
89
  return None
90
90
 
@@ -0,0 +1,89 @@
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 typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class CampaignPost201Response(BaseModel):
26
+ """
27
+ CampaignPost201Response
28
+ """ # noqa: E501
29
+ status: Optional[StrictBool] = None
30
+ data: Optional[Dict[str, Any]] = None
31
+ __properties: ClassVar[List[str]] = ["status", "data"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of CampaignPost201Response from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of CampaignPost201Response from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "status": obj.get("status"),
85
+ "data": obj.get("data")
86
+ })
87
+ return _obj
88
+
89
+
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class CreateCampaignRequest(BaseModel):
25
+ class CampaignPostRequest(BaseModel):
26
26
  """
27
- CreateCampaignRequest
27
+ CampaignPostRequest
28
28
  """ # noqa: E501
29
29
  name: StrictStr = Field(description="The name of the campaign")
30
30
  description: Optional[StrictStr] = Field(default=None, description="The description of the campaign")
@@ -50,7 +50,7 @@ class CreateCampaignRequest(BaseModel):
50
50
 
51
51
  @classmethod
52
52
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of CreateCampaignRequest from a JSON string"""
53
+ """Create an instance of CampaignPostRequest from a JSON string"""
54
54
  return cls.from_dict(json.loads(json_str))
55
55
 
56
56
  def to_dict(self) -> Dict[str, Any]:
@@ -75,7 +75,7 @@ class CreateCampaignRequest(BaseModel):
75
75
 
76
76
  @classmethod
77
77
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
- """Create an instance of CreateCampaignRequest from a dict"""
78
+ """Create an instance of CampaignPostRequest from a dict"""
79
79
  if obj is None:
80
80
  return None
81
81
 
@@ -19,16 +19,16 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictBool
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from smallestai.atoms.models.start_outbound_call200_response_data import StartOutboundCall200ResponseData
22
+ from smallestai.atoms.models.conversation_id_get200_response_data import ConversationIdGet200ResponseData
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class StartOutboundCall200Response(BaseModel):
26
+ class ConversationIdGet200Response(BaseModel):
27
27
  """
28
- StartOutboundCall200Response
28
+ ConversationIdGet200Response
29
29
  """ # noqa: E501
30
30
  status: Optional[StrictBool] = None
31
- data: Optional[StartOutboundCall200ResponseData] = None
31
+ data: Optional[ConversationIdGet200ResponseData] = None
32
32
  __properties: ClassVar[List[str]] = ["status", "data"]
33
33
 
34
34
  model_config = ConfigDict(
@@ -49,7 +49,7 @@ class StartOutboundCall200Response(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of StartOutboundCall200Response from a JSON string"""
52
+ """Create an instance of ConversationIdGet200Response from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self) -> Dict[str, Any]:
@@ -77,7 +77,7 @@ class StartOutboundCall200Response(BaseModel):
77
77
 
78
78
  @classmethod
79
79
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of StartOutboundCall200Response from a dict"""
80
+ """Create an instance of ConversationIdGet200Response from a dict"""
81
81
  if obj is None:
82
82
  return None
83
83
 
@@ -86,7 +86,7 @@ class StartOutboundCall200Response(BaseModel):
86
86
 
87
87
  _obj = cls.model_validate({
88
88
  "status": obj.get("status"),
89
- "data": StartOutboundCall200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
89
+ "data": ConversationIdGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
90
90
  })
91
91
  return _obj
92
92
 
@@ -23,9 +23,9 @@ from smallestai.atoms.models.agent_dto import AgentDTO
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
- class GetConversationLogs200ResponseData(BaseModel):
26
+ class ConversationIdGet200ResponseData(BaseModel):
27
27
  """
28
- GetConversationLogs200ResponseData
28
+ ConversationIdGet200ResponseData
29
29
  """ # noqa: E501
30
30
  id: Optional[StrictStr] = Field(default=None, description="The ID of the conversation", alias="_id")
31
31
  call_id: Optional[StrictStr] = Field(default=None, description="The ID of the conversation", alias="callId")
@@ -70,7 +70,7 @@ class GetConversationLogs200ResponseData(BaseModel):
70
70
 
71
71
  @classmethod
72
72
  def from_json(cls, json_str: str) -> Optional[Self]:
73
- """Create an instance of GetConversationLogs200ResponseData from a JSON string"""
73
+ """Create an instance of ConversationIdGet200ResponseData from a JSON string"""
74
74
  return cls.from_dict(json.loads(json_str))
75
75
 
76
76
  def to_dict(self) -> Dict[str, Any]:
@@ -98,7 +98,7 @@ class GetConversationLogs200ResponseData(BaseModel):
98
98
 
99
99
  @classmethod
100
100
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
101
- """Create an instance of GetConversationLogs200ResponseData from a dict"""
101
+ """Create an instance of ConversationIdGet200ResponseData from a dict"""
102
102
  if obj is None:
103
103
  return None
104
104
 
@@ -0,0 +1,93 @@
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.conversation_outbound_post200_response_data import ConversationOutboundPost200ResponseData
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ConversationOutboundPost200Response(BaseModel):
27
+ """
28
+ ConversationOutboundPost200Response
29
+ """ # noqa: E501
30
+ status: Optional[StrictBool] = None
31
+ data: Optional[ConversationOutboundPost200ResponseData] = 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 ConversationOutboundPost200Response 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 ConversationOutboundPost200Response 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": ConversationOutboundPost200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class StartOutboundCall200ResponseData(BaseModel):
25
+ class ConversationOutboundPost200ResponseData(BaseModel):
26
26
  """
27
- StartOutboundCall200ResponseData
27
+ ConversationOutboundPost200ResponseData
28
28
  """ # noqa: E501
29
29
  conversation_id: Optional[StrictStr] = Field(default=None, description="The ID of the initiated call", alias="conversationId")
30
30
  __properties: ClassVar[List[str]] = ["conversationId"]
@@ -47,7 +47,7 @@ class StartOutboundCall200ResponseData(BaseModel):
47
47
 
48
48
  @classmethod
49
49
  def from_json(cls, json_str: str) -> Optional[Self]:
50
- """Create an instance of StartOutboundCall200ResponseData from a JSON string"""
50
+ """Create an instance of ConversationOutboundPost200ResponseData from a JSON string"""
51
51
  return cls.from_dict(json.loads(json_str))
52
52
 
53
53
  def to_dict(self) -> Dict[str, Any]:
@@ -72,7 +72,7 @@ class StartOutboundCall200ResponseData(BaseModel):
72
72
 
73
73
  @classmethod
74
74
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
- """Create an instance of StartOutboundCall200ResponseData from a dict"""
75
+ """Create an instance of ConversationOutboundPost200ResponseData from a dict"""
76
76
  if obj is None:
77
77
  return None
78
78
 
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class StartOutboundCallRequest(BaseModel):
25
+ class ConversationOutboundPostRequest(BaseModel):
26
26
  """
27
- StartOutboundCallRequest
27
+ ConversationOutboundPostRequest
28
28
  """ # noqa: E501
29
29
  agent_id: StrictStr = Field(description="The ID of the agent initiating the conversation", alias="agentId")
30
30
  phone_number: StrictStr = Field(description="The phone number to call", alias="phoneNumber")
@@ -48,7 +48,7 @@ class StartOutboundCallRequest(BaseModel):
48
48
 
49
49
  @classmethod
50
50
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of StartOutboundCallRequest from a JSON string"""
51
+ """Create an instance of ConversationOutboundPostRequest from a JSON string"""
52
52
  return cls.from_dict(json.loads(json_str))
53
53
 
54
54
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +73,7 @@ class StartOutboundCallRequest(BaseModel):
73
73
 
74
74
  @classmethod
75
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of StartOutboundCallRequest from a dict"""
76
+ """Create an instance of ConversationOutboundPostRequest from a dict"""
77
77
  if obj is None:
78
78
  return None
79
79
 
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from smallestai.atoms.models.create_agent_request_language import CreateAgentRequestLanguage
23
23
  from typing import Optional, Set
@@ -29,12 +29,14 @@ class CreateAgentRequest(BaseModel):
29
29
  """ # noqa: E501
30
30
  name: StrictStr
31
31
  description: Optional[StrictStr] = None
32
+ background_sound: Optional[StrictBool] = Field(default=False, description="Whether to add ambient background sound during calls. Currently provides office ambience by default. Additional sound options available upon request.", alias="backgroundSound")
32
33
  language: Optional[CreateAgentRequestLanguage] = None
33
34
  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='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
+ slm_model: Optional[StrictStr] = Field(default='electron', 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
36
  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")
37
+ global_prompt: Optional[StrictStr] = Field(default=None, description="Set global instructions for your agent's personality, role, and behavior throughout conversations", alias="globalPrompt")
36
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")
37
- __properties: ClassVar[List[str]] = ["name", "description", "language", "globalKnowledgeBaseId", "slmModel", "defaultVariables", "telephonyProductId"]
39
+ __properties: ClassVar[List[str]] = ["name", "description", "backgroundSound", "language", "globalKnowledgeBaseId", "slmModel", "defaultVariables", "globalPrompt", "telephonyProductId"]
38
40
 
39
41
  @field_validator('slm_model')
40
42
  def slm_model_validate_enum(cls, value):
@@ -42,8 +44,8 @@ class CreateAgentRequest(BaseModel):
42
44
  if value is None:
43
45
  return value
44
46
 
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
+ if value not in set(['electron', 'gpt-4o']):
48
+ raise ValueError("must be one of enum values ('electron', 'gpt-4o')")
47
49
  return value
48
50
 
49
51
  model_config = ConfigDict(
@@ -102,10 +104,12 @@ class CreateAgentRequest(BaseModel):
102
104
  _obj = cls.model_validate({
103
105
  "name": obj.get("name"),
104
106
  "description": obj.get("description"),
107
+ "backgroundSound": obj.get("backgroundSound") if obj.get("backgroundSound") is not None else False,
105
108
  "language": CreateAgentRequestLanguage.from_dict(obj["language"]) if obj.get("language") is not None else None,
106
109
  "globalKnowledgeBaseId": obj.get("globalKnowledgeBaseId"),
107
- "slmModel": obj.get("slmModel") if obj.get("slmModel") is not None else 'electron-v1',
110
+ "slmModel": obj.get("slmModel") if obj.get("slmModel") is not None else 'electron',
108
111
  "defaultVariables": obj.get("defaultVariables"),
112
+ "globalPrompt": obj.get("globalPrompt"),
109
113
  "telephonyProductId": obj.get("telephonyProductId")
110
114
  })
111
115
  return _obj