letschatty 0.4.339__py3-none-any.whl → 0.4.340__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/services/chat/chat_service.py +19 -0
- {letschatty-0.4.339.dist-info → letschatty-0.4.340.dist-info}/METADATA +1 -1
- {letschatty-0.4.339.dist-info → letschatty-0.4.340.dist-info}/RECORD +5 -5
- {letschatty-0.4.339.dist-info → letschatty-0.4.340.dist-info}/LICENSE +0 -0
- {letschatty-0.4.339.dist-info → letschatty-0.4.340.dist-info}/WHEEL +0 -0
|
@@ -211,6 +211,25 @@ class ChatService:
|
|
|
211
211
|
ChatService.add_central_notification_from_text(chat=chat, body=f"Agente de IA {chatty_ai_agent.name} actualizado en el chat {chat.id} por {execution_context.executor.name}", subtype=MessageSubtype.CHATTY_AI_AGENT_UPDATED)
|
|
212
212
|
return chat.chatty_ai_agent
|
|
213
213
|
|
|
214
|
+
@staticmethod
|
|
215
|
+
def escalate_chatty_ai_agent(chat: Chat, execution_context: ExecutionContext, message: Optional[str] = None) -> None:
|
|
216
|
+
"""
|
|
217
|
+
Mark the chat's AI agent as requiring human intervention and add a central notification.
|
|
218
|
+
"""
|
|
219
|
+
if chat.chatty_ai_agent and not chat.chatty_ai_agent.requires_human_intervention:
|
|
220
|
+
chat.chatty_ai_agent.requires_human_intervention = True
|
|
221
|
+
execution_context.set_event_time(datetime.now(tz=ZoneInfo("UTC")))
|
|
222
|
+
body = "El chat fue escalado a un agente humano"
|
|
223
|
+
if message:
|
|
224
|
+
body = f"{body}: {message}"
|
|
225
|
+
ChatService.add_central_notification_from_text(
|
|
226
|
+
chat=chat,
|
|
227
|
+
body=body,
|
|
228
|
+
subtype=MessageSubtype.CHATTY_AI_AGENT_NOTIFICATION,
|
|
229
|
+
content_status=CentralNotificationStatus.WARNING,
|
|
230
|
+
context=ChattyContext(chain_of_thought_id=execution_context.chain_of_thought_id)
|
|
231
|
+
)
|
|
232
|
+
|
|
214
233
|
@staticmethod
|
|
215
234
|
def add_workflow_link(chat : Chat, link : LinkItem, flow:FlowPreview, execution_context: ExecutionContext, description: str, last_incoming_message_id: Optional[str] = None, next_call: Optional[datetime] = None) -> FlowStateAssignedToChat:
|
|
216
235
|
"""
|
|
@@ -230,7 +230,7 @@ letschatty/services/ai_agents/tool_descriptions/human_handover.json,sha256=-b3l_
|
|
|
230
230
|
letschatty/services/ai_agents/tool_descriptions.py,sha256=MMFhcgEl6Z7k8BUv3Yx1pCxHzIjc8HD93S0uM5OPj8Y,105
|
|
231
231
|
letschatty/services/ai_components_service.py,sha256=QUb-NdzHj4nPmnceVSQ9Pe3swFWUrkUFKzDZeuP0b5o,3762
|
|
232
232
|
letschatty/services/chat/chat_extractors.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
233
|
-
letschatty/services/chat/chat_service.py,sha256=
|
|
233
|
+
letschatty/services/chat/chat_service.py,sha256=BQK-xVm9BMPwnoEcZHufhevMJIJ5yzhZnCoyFf0qp5s,49068
|
|
234
234
|
letschatty/services/chat/client_service.py,sha256=TtlG0GJDqx6YemfueiJzAtMNk_udnPhg0MJG0bKwnk8,1097
|
|
235
235
|
letschatty/services/chat/conversation_topics_service.py,sha256=jvIkpHTCz0JKXui3n_BRs6UQ-TB3x7DrQsnX2zUVFVw,2461
|
|
236
236
|
letschatty/services/chatty_assets/__init__.py,sha256=quOXMGvcDVRkbeaGfCQliFfZzis5m1wrfJkHqDkWRx8,132
|
|
@@ -275,7 +275,7 @@ letschatty/services/template_campaigns/template_campaign_service.py,sha256=jORgD
|
|
|
275
275
|
letschatty/services/users/agent_service.py,sha256=hIkUUJ1SpkKbh5_uo4i2CeqGtuMTjU7tSV8k5J7WPG4,279
|
|
276
276
|
letschatty/services/users/user_factory.py,sha256=FCB9uiAfjMeYfh4kMdx5h8VDHJ8MCsD-uaxW3X3KaWM,6681
|
|
277
277
|
letschatty/services/validators/analytics_validator.py,sha256=-QBR6XIqEv2qw3stcBQehkwui1EcfWUM6M9DRQODykY,6335
|
|
278
|
-
letschatty-0.4.
|
|
279
|
-
letschatty-0.4.
|
|
280
|
-
letschatty-0.4.
|
|
281
|
-
letschatty-0.4.
|
|
278
|
+
letschatty-0.4.340.dist-info/LICENSE,sha256=EClLu_bO2HBLDcThowIwfaIg5EOwIYhpRsBJjVEk92A,1197
|
|
279
|
+
letschatty-0.4.340.dist-info/METADATA,sha256=HDe6iHDJWt8j5QCRLey6W21uZfhg3ykXUIHplKqU_oc,3283
|
|
280
|
+
letschatty-0.4.340.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
281
|
+
letschatty-0.4.340.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|