letschatty 0.4.329__py3-none-any.whl → 0.4.332__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.
- letschatty/models/ai_microservices/expected_output.py +0 -8
- letschatty/models/ai_microservices/lambda_events.py +1 -7
- letschatty/models/chat/continuous_conversation.py +1 -1
- letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent.py +1 -7
- letschatty/models/utils/custom_exceptions/custom_exceptions.py +0 -24
- {letschatty-0.4.329.dist-info → letschatty-0.4.332.dist-info}/METADATA +1 -1
- {letschatty-0.4.329.dist-info → letschatty-0.4.332.dist-info}/RECORD +9 -9
- {letschatty-0.4.329.dist-info → letschatty-0.4.332.dist-info}/LICENSE +0 -0
- {letschatty-0.4.329.dist-info → letschatty-0.4.332.dist-info}/WHEEL +0 -0
|
@@ -169,12 +169,6 @@ class ExpectedOutputIncomingMessage(BaseModel):
|
|
|
169
169
|
action: IncomingMessageDecisionAction
|
|
170
170
|
messages: List[str] = Field(description="Array of message strings to send to the customer. Required for send/suggest actions, optional for escalate action, empty array for skip/remove actions.")
|
|
171
171
|
chain_of_thought: ChainOfThoughtInChatRequest = Field(description="REQUIRED: Your reasoning process and response decision explanation")
|
|
172
|
-
confidence: Optional[int] = Field(
|
|
173
|
-
default=None,
|
|
174
|
-
ge=0,
|
|
175
|
-
le=100,
|
|
176
|
-
description="Confidence level 0-100"
|
|
177
|
-
)
|
|
178
172
|
|
|
179
173
|
def to_incoming_message_decision_output(self) -> IncomingMessageAIDecision:
|
|
180
174
|
messages_drafts = [
|
|
@@ -193,5 +187,3 @@ class ExpectedOutputIncomingMessage(BaseModel):
|
|
|
193
187
|
return incoming_decision
|
|
194
188
|
|
|
195
189
|
|
|
196
|
-
class ExpectedOutputSmartFollowUp(BaseModel):
|
|
197
|
-
action: Optional[str] = None
|
|
@@ -5,9 +5,8 @@ from typing import Dict, Any, List, Optional
|
|
|
5
5
|
from letschatty.models.base_models.ai_agent_component import AiAgentComponentType
|
|
6
6
|
from letschatty.models.utils.types.identifier import StrObjectId
|
|
7
7
|
from .lambda_invokation_types import InvokationType, LambdaAiEvent
|
|
8
|
-
from .expected_output import ExpectedOutputIncomingMessage, ExpectedOutputSmartTag, ExpectedOutputQualityTest,
|
|
8
|
+
from .expected_output import ExpectedOutputIncomingMessage, ExpectedOutputSmartTag, ExpectedOutputQualityTest, IncomingMessageAIDecision
|
|
9
9
|
from ...models.company.assets.ai_agents_v2.ai_agents_decision_output import IncomingMessageDecisionAction
|
|
10
|
-
from ...models.company.assets.ai_agents_v2.chatty_ai_agent_in_chat import HumanInterventionReason
|
|
11
10
|
|
|
12
11
|
class SmartTaggingCallbackMetadata(BaseModel):
|
|
13
12
|
chat_id: StrObjectId
|
|
@@ -78,11 +77,6 @@ class FollowUpEvent(LambdaAiEvent):
|
|
|
78
77
|
type: InvokationType = InvokationType.FOLLOW_UP
|
|
79
78
|
data: ChatData
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
class SmartFollowUpDecisionOutputEvent(LambdaAiEvent):
|
|
83
|
-
type: InvokationType = InvokationType.FOLLOW_UP
|
|
84
|
-
data: ExpectedOutputSmartFollowUp
|
|
85
|
-
|
|
86
80
|
class QualityTestEventData(BaseModel):
|
|
87
81
|
chat_example_id: StrObjectId
|
|
88
82
|
company_id: StrObjectId
|
|
@@ -30,7 +30,7 @@ class ContinuousConversation(ChattyAssetModel):
|
|
|
30
30
|
template_message_waid: Optional[str] = None
|
|
31
31
|
status: Optional[ContinuousConversationStatus] = Field(default=ContinuousConversationStatus.CREATED)
|
|
32
32
|
active: bool = Field(default=True)
|
|
33
|
-
expires_at: datetime = Field(
|
|
33
|
+
expires_at: datetime = Field(default_factory=lambda: datetime.now(ZoneInfo("UTC")) + timedelta(days=10))
|
|
34
34
|
messages: List[MessageDraft]
|
|
35
35
|
creator_id: StrObjectId
|
|
36
36
|
forced_send: bool = Field(default=False)
|
|
@@ -110,12 +110,6 @@ class ChattyAIAgent(CompanyAssetModel):
|
|
|
110
110
|
examples: List[StrObjectId] = Field(default_factory=list, description="Training examples")
|
|
111
111
|
double_checker_enabled: bool = Field(default=False, description="Whether the double checker is enabled")
|
|
112
112
|
double_checker_instructions: Optional[str] = Field(default=None, description="Instructions for the double checker")
|
|
113
|
-
copilot_confidence_threshold: Optional[int] = Field(
|
|
114
|
-
default=None,
|
|
115
|
-
ge=0,
|
|
116
|
-
le=100,
|
|
117
|
-
description="Confidence threshold 0-100 para modo COPILOT (fallback a env si no está)"
|
|
118
|
-
)
|
|
119
113
|
|
|
120
114
|
# Pre-qualification configuration
|
|
121
115
|
pre_qualify: Optional["PreQualifyConfig"] = Field(
|
|
@@ -171,4 +165,4 @@ class ChattyAIAgent(CompanyAssetModel):
|
|
|
171
165
|
|
|
172
166
|
# Import and rebuild for forward reference resolution
|
|
173
167
|
from .pre_qualify_config import PreQualifyConfig
|
|
174
|
-
ChattyAIAgent.model_rebuild()
|
|
168
|
+
ChattyAIAgent.model_rebuild()
|
|
@@ -59,30 +59,6 @@ class WhatsAppPayloadValidationError(Exception):
|
|
|
59
59
|
def __init__(self, message="WhatsApp payload validation error", status_code=400, **context_data):
|
|
60
60
|
super().__init__(message, status_code=status_code, **context_data)
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
class ChatWithActiveContinuousConversation(CustomException):
|
|
64
|
-
"""
|
|
65
|
-
Raised when an AI agent is triggered on a chat that has an active Continuous Conversation.
|
|
66
|
-
"""
|
|
67
|
-
def __init__(self, message="Chat has an active continuous conversation", status_code=400, **context_data):
|
|
68
|
-
super().__init__(message, status_code=status_code, **context_data)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class ChattyAIModeOff(CustomException):
|
|
72
|
-
"""
|
|
73
|
-
Raised when an AI agent is in OFF mode and cannot be triggered.
|
|
74
|
-
"""
|
|
75
|
-
def __init__(self, message="Chatty AI agent is OFF", status_code=400, **context_data):
|
|
76
|
-
super().__init__(message, status_code=status_code, **context_data)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
class MissingAIAgentInChat(CustomException):
|
|
80
|
-
"""
|
|
81
|
-
Raised when a chat has no AI agent assigned but one is required for the operation.
|
|
82
|
-
"""
|
|
83
|
-
def __init__(self, message="AI agent not assigned to chat", status_code=404, **context_data):
|
|
84
|
-
super().__init__(message, status_code=status_code, **context_data)
|
|
85
|
-
|
|
86
62
|
class UnsuportedChannel(CustomException):
|
|
87
63
|
def __init__(self, message="Channel not supported", status_code=400, **context_data):
|
|
88
64
|
super().__init__(message, status_code=status_code, **context_data)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
letschatty/__init__.py,sha256=6dGYdy5edB1dHdgvpqUpENZ347CpIyWgR1CsGYwPSk8,45
|
|
2
2
|
letschatty/models/__init__.py,sha256=obWHa796C-O1mqo_lk22KhUC2ODVvG7cICY3Lo-AqJg,126
|
|
3
3
|
letschatty/models/ai_microservices/__init__.py,sha256=h0xLiuU1wfHpDl1oKCzVKUef3ROYU7qIyVxBsdcdZe0,641
|
|
4
|
-
letschatty/models/ai_microservices/expected_output.py,sha256=
|
|
5
|
-
letschatty/models/ai_microservices/lambda_events.py,sha256=
|
|
4
|
+
letschatty/models/ai_microservices/expected_output.py,sha256=2JuQvQAmaWPuDiZQyHA4r9yAnVAKgzDA5oxe-xaxKMc,9220
|
|
5
|
+
letschatty/models/ai_microservices/lambda_events.py,sha256=meIr4rVb9QEZL0VKziZ46NzGfedOzxuo0CA6NgquYhM,14045
|
|
6
6
|
letschatty/models/ai_microservices/lambda_invokation_types.py,sha256=KWvXFvHhwYMaAIHbGpdW8AYE0eqrfCgZ_28jIyGXoME,1918
|
|
7
7
|
letschatty/models/ai_microservices/n8n_ai_agents_payload.py,sha256=E5tu2UcSJCybMSvxfZG3JIxSxHbTBbjdRE74cnRtlGY,696
|
|
8
8
|
letschatty/models/ai_microservices/openai_payloads.py,sha256=HauUGf4c37khJJsKyH4ikxzHKboGWnerjDQgDOnMFrY,271
|
|
@@ -67,7 +67,7 @@ letschatty/models/chat/chat.py,sha256=NJcahnCHmY_RLUP6oKQEuEn1J8ycUsIkc7OruQmn1z
|
|
|
67
67
|
letschatty/models/chat/chat_status_modifications.py,sha256=LcwXNl4WRllPI_ZYKcg5ANRjmSk4Cykkra0naayMAt4,317
|
|
68
68
|
letschatty/models/chat/chat_with_assets.py,sha256=AvpcKz5zyiIxfnLjyVx8JSX9c0UQFhVKoACnyW0bu4Q,574
|
|
69
69
|
letschatty/models/chat/client.py,sha256=qMaa-s65lBHMXOpSO2XRtKYeEki7Rr3E79ocKI5kcC4,2299
|
|
70
|
-
letschatty/models/chat/continuous_conversation.py,sha256=
|
|
70
|
+
letschatty/models/chat/continuous_conversation.py,sha256=hoRYOMd_vfYglTGVw30yKS5Ogt5mLcsgDySrfHEli6o,4529
|
|
71
71
|
letschatty/models/chat/filter_parameters.py,sha256=X1IHBYCJr_1y4R8syQYEwKhintdUZc-ZiB_8kSnjiYw,4489
|
|
72
72
|
letschatty/models/chat/flow_link_state.py,sha256=RblDBp6uD-P0ZtaQn1-HzL1EpEgtVhN1rT3iBhO0gMw,5458
|
|
73
73
|
letschatty/models/chat/highlight.py,sha256=bUpXSMvwoTKiDa6AWDRKfMYxv5d6sax7soNtc8rAtpo,555
|
|
@@ -85,7 +85,7 @@ letschatty/models/company/assets/ai_agents_v2/ai_agents_decision_output.py,sha25
|
|
|
85
85
|
letschatty/models/company/assets/ai_agents_v2/chain_of_thought_in_chat.py,sha256=LJqtSl1A1V0frPLYwW-5cMZxaGx7-0x1HvujRXsZsNU,5877
|
|
86
86
|
letschatty/models/company/assets/ai_agents_v2/chat_example.py,sha256=yCKt6ifNYch3C78zAvj8To0_Sb9CPAZ8sC-hyoBPa4s,1816
|
|
87
87
|
letschatty/models/company/assets/ai_agents_v2/chat_example_test.py,sha256=vChD-TkX1ORRD9LMbd2HlpbK4QyrsfhDiJd-LDjIqlk,4618
|
|
88
|
-
letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent.py,sha256=
|
|
88
|
+
letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent.py,sha256=hRDdyG2dTgmu7KUHHCMviGJ03XiU99gVS5jp3EWyVUs,7992
|
|
89
89
|
letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_config_for_automation.py,sha256=W8orpgp-yG8OHNWGQ16jMv-VgM_Z-Hk0q8PtC0KT2KU,388
|
|
90
90
|
letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_in_chat.py,sha256=uVmD4FqGP5Tc8noxMBuRYGbkOXrtYlH2w6SAYwQZlLo,15494
|
|
91
91
|
letschatty/models/company/assets/ai_agents_v2/chatty_ai_mode.py,sha256=CKlKI3t_D5eWJPn6hRvN4_V8Wu6W8c0x_EFQlpA50F4,2521
|
|
@@ -202,7 +202,7 @@ letschatty/models/messages/meta_message_model/schema/values/value_messages.py,sh
|
|
|
202
202
|
letschatty/models/messages/meta_message_model/schema/values/value_statuses.py,sha256=SGibpHxdWy6DbzGfJjlrHIxrviqxXbRj54k4rz-fDQM,1966
|
|
203
203
|
letschatty/models/utils/__init__.py,sha256=ziz1DfISJPfq5dE9xjNiwBlwsscHfOks1s0BWD7c1cI,20
|
|
204
204
|
letschatty/models/utils/custom_exceptions/__init__.py,sha256=FrZBwS0o2TuTJcJFRnreRT5v_tv8EY2_EhKL2cAr7PI,32
|
|
205
|
-
letschatty/models/utils/custom_exceptions/custom_exceptions.py,sha256=
|
|
205
|
+
letschatty/models/utils/custom_exceptions/custom_exceptions.py,sha256=yzakSiZhyA5boBedGffN8-7W7VRfP6P1kYtRed4in2w,10690
|
|
206
206
|
letschatty/models/utils/definitions.py,sha256=ylyTOyDVYpE6UcViTSpxnzoxic4VzPVHE45k2Vc1U6A,826
|
|
207
207
|
letschatty/models/utils/types/CRUD_operations.py,sha256=bRagXYtzeIzM4JSY8mD-4tTaqviUmq_0tY9H74nSS5I,139
|
|
208
208
|
letschatty/models/utils/types/__init__.py,sha256=2z69a0c4s5fWiA9I3thv4P_SbehlvF3e-t757L0vcK4,419
|
|
@@ -274,7 +274,7 @@ letschatty/services/template_campaigns/template_campaign_service.py,sha256=jORgD
|
|
|
274
274
|
letschatty/services/users/agent_service.py,sha256=hIkUUJ1SpkKbh5_uo4i2CeqGtuMTjU7tSV8k5J7WPG4,279
|
|
275
275
|
letschatty/services/users/user_factory.py,sha256=FCB9uiAfjMeYfh4kMdx5h8VDHJ8MCsD-uaxW3X3KaWM,6681
|
|
276
276
|
letschatty/services/validators/analytics_validator.py,sha256=-QBR6XIqEv2qw3stcBQehkwui1EcfWUM6M9DRQODykY,6335
|
|
277
|
-
letschatty-0.4.
|
|
278
|
-
letschatty-0.4.
|
|
279
|
-
letschatty-0.4.
|
|
280
|
-
letschatty-0.4.
|
|
277
|
+
letschatty-0.4.332.dist-info/LICENSE,sha256=EClLu_bO2HBLDcThowIwfaIg5EOwIYhpRsBJjVEk92A,1197
|
|
278
|
+
letschatty-0.4.332.dist-info/METADATA,sha256=32bLBqSIgu54CEMcJGo4nXmnoDWPzGSbABK5FuxZLnE,3283
|
|
279
|
+
letschatty-0.4.332.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
280
|
+
letschatty-0.4.332.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|