letschatty 0.4.328__tar.gz → 0.4.332__tar.gz
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-0.4.328 → letschatty-0.4.332}/PKG-INFO +1 -1
- {letschatty-0.4.328 → letschatty-0.4.332}/pyproject.toml +1 -1
- letschatty-0.4.332/src/letschatty/models/ai_microservices/__init__.py +10 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/ai_microservices/expected_output.py +1 -36
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/ai_microservices/lambda_events.py +27 -142
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/ai_microservices/lambda_invokation_types.py +1 -3
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/ai_microservices/n8n_ai_agents_payload.py +1 -3
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/__init__.py +1 -2
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/company_based_events/asset_events.py +3 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/event_type_to_classes.py +4 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/event_types.py +0 -45
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/continuous_conversation.py +1 -1
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/ai_agents_decision_output.py +1 -1
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent.py +1 -7
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/get_chat_with_prompt_response.py +0 -1
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/pre_qualify_config.py +2 -14
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/automation.py +0 -18
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/data_base/collection_interface.py +29 -101
- letschatty-0.4.332/src/letschatty/models/data_base/mongo_connection.py +35 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/custom_exceptions/custom_exceptions.py +1 -38
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/smart_follow_up_context_builder_v2.py +2 -5
- letschatty-0.4.332/src/letschatty/services/chatty_assets/__init__.py +2 -0
- letschatty-0.4.332/src/letschatty/services/chatty_assets/asset_service.py +83 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chatty_assets/base_container.py +2 -3
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chatty_assets/base_container_with_collection.py +26 -35
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/continuous_conversation_service/continuous_conversation_helper.py +0 -11
- letschatty-0.4.332/src/letschatty/services/events/events_manager.py +2 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/analytics/events_factory.py +1 -63
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/lambda_ai_orchestrartor/lambda_events_factory.py +8 -25
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/messages_helpers/get_caption_or_body_or_preview.py +4 -6
- letschatty-0.4.328/src/letschatty/models/ai_microservices/__init__.py +0 -10
- letschatty-0.4.328/src/letschatty/models/analytics/events/chat_based_events/ai_agent_execution_event.py +0 -71
- letschatty-0.4.328/src/letschatty/models/data_base/mongo_connection.py +0 -118
- letschatty-0.4.328/src/letschatty/services/chatty_assets/__init__.py +0 -14
- letschatty-0.4.328/src/letschatty/services/chatty_assets/asset_service.py +0 -260
- letschatty-0.4.328/src/letschatty/services/chatty_assets/assets_collections.py +0 -137
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/__init__.py +0 -38
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/ai_agent_collection.py +0 -19
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/ai_agent_in_chat_collection.py +0 -32
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/ai_component_collection.py +0 -21
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/chain_of_thought_collection.py +0 -30
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/chat_collection.py +0 -21
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/contact_point_collection.py +0 -21
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/fast_answer_collection.py +0 -21
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/filter_criteria_collection.py +0 -18
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/flow_collection.py +0 -20
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/product_collection.py +0 -20
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/sale_collection.py +0 -20
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/source_collection.py +0 -21
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/tag_collection.py +0 -19
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/topic_collection.py +0 -21
- letschatty-0.4.328/src/letschatty/services/chatty_assets/collections/user_collection.py +0 -20
- letschatty-0.4.328/src/letschatty/services/chatty_assets/example_usage.py +0 -44
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/__init__.py +0 -37
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/ai_agent_in_chat_service.py +0 -73
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/ai_agent_service.py +0 -23
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/chain_of_thought_service.py +0 -70
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/chat_service.py +0 -25
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/contact_point_service.py +0 -29
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/fast_answer_service.py +0 -32
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/filter_criteria_service.py +0 -30
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/flow_service.py +0 -25
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/product_service.py +0 -30
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/sale_service.py +0 -25
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/source_service.py +0 -28
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/tag_service.py +0 -32
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/topic_service.py +0 -31
- letschatty-0.4.328/src/letschatty/services/chatty_assets/services/user_service.py +0 -32
- letschatty-0.4.328/src/letschatty/services/events/__init__.py +0 -6
- letschatty-0.4.328/src/letschatty/services/events/events_manager.py +0 -219
- letschatty-0.4.328/src/letschatty/services/factories/analytics/ai_agent_event_factory.py +0 -161
- {letschatty-0.4.328 → letschatty-0.4.332}/LICENSE +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/README.md +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/ai_microservices/openai_payloads.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/base.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/ai_agent_chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/business_area.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/chat_based_event.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/chat_context.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/chat_funnel.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/chat_status.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/contact_point.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/continuous_conversation.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/highlight.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/message.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/messages_intent_context.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/product_chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/quality_scoring.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/sale.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/tag_chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/chat_based_events/workflow.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/company_based_events/company_events.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/company_based_events/user_events.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/metrics/__init_.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/metrics/daily_contact_points.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/metrics/daily_new_chats.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/metrics/daily_sent_templates_grouped.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/metrics/sales_roadmap.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/metrics/sent_templates.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/smart_messages/friendly_code_for_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/smart_messages/topic.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/smart_messages/topic_message.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/google_ad_utm_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/helpers.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/other_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/pure_ad.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/pure_ad_utm_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/source_base.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/template_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/topic_default_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/utm_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/utms/referer_info.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/utms/utm_query_params.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/sources/whatsapp_default_source.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/auth/jwt.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/ai_agent_component.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/chatty_asset_model.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/helpers.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/related_asset_usage_example.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/singleton.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/update_model_interface.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/base_models/validate_timestamps_and_id.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/channels/channel.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/assets_assigned_to_chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/chat_status_modifications.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/chat_with_assets.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/client.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/filter_parameters.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/flow_link_state.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/highlight.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/preview.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/quality_scoring.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/scheduled_messages.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/temporary_chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/time_left.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/CRM/business_area.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/CRM/funnel.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/ai_agent_message_draft.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/chain_of_thought_in_chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/chat_example.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/chat_example_test.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_config_for_automation.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_agent_in_chat.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/chatty_ai_mode.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/context_item.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/faq.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/follow_up_strategy.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/knowleadge_base_components.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/n8n_agents_info.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/n8n_schema_incoming_message_output.json +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/ai_agents_v2/n8n_schema_smart_follow_up_output.json +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/assignment/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/assignment/assignment_assets.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/chat_assets.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/chatty_fast_answers/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/chatty_fast_answers/chatty_fast_answer.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/company_assets.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/contact_point.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/filter_criteria.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/flow.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/launch/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/launch/launch.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/launch/scheduled_communication.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/launch/subscription.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/media/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/media/file.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/product.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/sale.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/tag.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/users/agent_chats_snapshot.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/users/user.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/users/user_asset_permission.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/workflow_execution.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/company_chats_snapshot.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/company_messaging_settgins.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/conversation_topic.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/empresa.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/form_field.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/insight.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/notifications/notification.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/copilot/links.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/data_base/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/execution/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/execution/execution.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/execution/executor.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/forms/company/auth0_company_registration_form.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/forms/company/meta_register.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/audio.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/base/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/base/chatty_message_json.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/base/message_base.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/base/message_draft.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/button.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/central_notification.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/contact.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/document.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/image.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/interactive.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/location.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/reaction.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_audio.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_button.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_central.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_contacts.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_document.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_image.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_interactive.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_location.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_media.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_reaction.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_sticker.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_text.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_content/content_video.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_context/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_context/chatty_context.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_referal/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/schema/chatty_referal/chatty_referal.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/sticker.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/text.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/chatty_messages/video.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/message_templates/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/message_templates/chatty_template_campaign.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/message_templates/filled_data_from_frontend.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/message_templates/payload_for_sending_template.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/message_templates/raw_meta_template.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/message_templates/recipient_of_template_campaign.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/message_templates/required_for_frontend_templates.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/meta_base_notification_json.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/meta_error_json.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/meta_inexistent_json.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/meta_message_json.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/meta_status_json.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/meta_unknown_json.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/button_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/contacts_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/interactive_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/location_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/multimedia_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/order_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/reaction_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/system_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/content_messages/text_content.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/values/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/values/value_errors.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/values/value_messages.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/messages/meta_message_model/schema/values/value_statuses.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/custom_exceptions/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/definitions.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/CRUD_operations.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/channel_types.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/chats_actions.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/country.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/deletion_type.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/executor_types.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/identifier.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/message_status_types.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/message_types.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/phone_number.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/serializer_type.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/source_types.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/utils/types/typealiases.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/context_builder_v2.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/cot_follow_up_examples.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/followup_schema.json +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/smart_follow_up_service_v2.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/tool_descriptions/assign_chat_to_ai_agent_itself.json +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/tool_descriptions/human_handover.json +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_agents/tool_descriptions.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/ai_components_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chat/chat_extractors.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chat/chat_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chat/client_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chat/conversation_topics_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chatty_assets/documentation_diagram.png +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/chatty_assets/readme.md +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/concurrent/concurrent.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/contact_points/contact_point_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/analytics/contact_point_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/analytics/smart_messages/topics_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/analytics/sources/helpers.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/analytics/sources/source_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/chats/chat_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/chatty_fast_answers/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/chatty_fast_answers/chatty_fast_answers_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/clients/client_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/company/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/company/empresa_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/central_notification_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/chatty_message_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/child_db_message_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/child_request_message.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/from_template_hot_fix.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/message_templates/template_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/messages/message_templates/test.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/meta_notifications/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/meta_notifications/meta_notification_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/factories/product_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/filter_criteria_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/messages_helpers/__init__.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/scheduled_messages_service/scheduled_messages_helpers.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/template_campaigns/template_campaign_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/users/agent_service.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/users/user_factory.py +0 -0
- {letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/services/validators/analytics_validator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "letschatty"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.332" # Or whichever is your latest version
|
|
4
4
|
description = "Models and custom classes to work across the Chattyverse"
|
|
5
5
|
authors = ["Axel <axel@letschatty.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from .expected_output import ExpectedOutputQualityTest, ExpectedOutputSmartTag
|
|
2
|
+
from .lambda_events import (
|
|
3
|
+
IncomingMessageCallbackEvent, QualityTestCallbackEvent, SmartTaggingCallbackEvent,
|
|
4
|
+
QualityTestInteractionCallbackEvent, IncomingMessageEvent, QualityTestEvent,
|
|
5
|
+
AllQualityTestEvent, FollowUpEvent, SmartTaggingEvent, QualityTestEventData, AllQualityTestEventData,ChatData,
|
|
6
|
+
ComparisonAnalysisCallbackMetadata, InteractionCallbackMetadata, SmartTaggingCallbackMetadata,
|
|
7
|
+
SmartTaggingPromptEvent
|
|
8
|
+
)
|
|
9
|
+
from .lambda_invokation_types import InvokationType, LambdaAiEvent
|
|
10
|
+
from .openai_payloads import OpenaiPayload, N8nPayload
|
{letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/ai_microservices/expected_output.py
RENAMED
|
@@ -6,10 +6,9 @@ from typing import List, Optional, Literal
|
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
|
|
8
8
|
from letschatty.models.utils.types.message_types import MessageType
|
|
9
|
-
from ...models.company.assets.ai_agents_v2.ai_agents_decision_output import ChainOfThoughtInChatRequest, IncomingMessageAIDecision, IncomingMessageDecisionAction
|
|
9
|
+
from ...models.company.assets.ai_agents_v2.ai_agents_decision_output import ChainOfThoughtInChatRequest, IncomingMessageAIDecision, IncomingMessageDecisionAction
|
|
10
10
|
from ...models.company.assets.automation import Automation
|
|
11
11
|
from ...models.company.form_field import CollectedData
|
|
12
|
-
from ...models.chat.chat import Area
|
|
13
12
|
|
|
14
13
|
class ExpectedOutputQualityTest(BaseModel):
|
|
15
14
|
accuracy: float = Field(description="The accuracy of the comparison analysis")
|
|
@@ -170,12 +169,6 @@ class ExpectedOutputIncomingMessage(BaseModel):
|
|
|
170
169
|
action: IncomingMessageDecisionAction
|
|
171
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.")
|
|
172
171
|
chain_of_thought: ChainOfThoughtInChatRequest = Field(description="REQUIRED: Your reasoning process and response decision explanation")
|
|
173
|
-
confidence: Optional[int] = Field(
|
|
174
|
-
default=None,
|
|
175
|
-
ge=0,
|
|
176
|
-
le=100,
|
|
177
|
-
description="Confidence level 0-100"
|
|
178
|
-
)
|
|
179
172
|
|
|
180
173
|
def to_incoming_message_decision_output(self) -> IncomingMessageAIDecision:
|
|
181
174
|
messages_drafts = [
|
|
@@ -194,31 +187,3 @@ class ExpectedOutputIncomingMessage(BaseModel):
|
|
|
194
187
|
return incoming_decision
|
|
195
188
|
|
|
196
189
|
|
|
197
|
-
class ExpectedOutputSmartFollowUp(BaseModel):
|
|
198
|
-
action: SmartFollowUpDecisionAction
|
|
199
|
-
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/postpone actions.")
|
|
200
|
-
chain_of_thought: ChainOfThoughtInChatRequest = Field(description="REQUIRED: Your reasoning process and response decision explanation")
|
|
201
|
-
next_call_time: Optional[datetime] = Field(default=None, description="The next call time for the smart follow up (required for postpone_delta_time action)")
|
|
202
|
-
reason: Optional[str] = Field(default=None, description="Reason for the decision (especially for postpone/postponed actions)")
|
|
203
|
-
area: Optional[Area] = Field(default=None, description="The area to move the chat after the decision")
|
|
204
|
-
|
|
205
|
-
def to_smart_follow_up_decision_output(self) -> SmartFollowUpDecision:
|
|
206
|
-
messages_drafts = [
|
|
207
|
-
MessageDraft(
|
|
208
|
-
type=MessageType.TEXT,
|
|
209
|
-
content=ChattyContentText(body=message),
|
|
210
|
-
is_incoming_message=False
|
|
211
|
-
)
|
|
212
|
-
for message in self.messages
|
|
213
|
-
]
|
|
214
|
-
smart_follow_up_decision = SmartFollowUpDecision(
|
|
215
|
-
action=self.action,
|
|
216
|
-
next_call_time=self.next_call_time,
|
|
217
|
-
messages=messages_drafts,
|
|
218
|
-
chain_of_thought=self.chain_of_thought,
|
|
219
|
-
reason=self.reason,
|
|
220
|
-
area=self.area
|
|
221
|
-
)
|
|
222
|
-
return smart_follow_up_decision
|
|
223
|
-
|
|
224
|
-
|
{letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/ai_microservices/lambda_events.py
RENAMED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
from letschatty.models.company.assets.ai_agents_v2.chatty_ai_agent_in_chat import HumanInterventionReason
|
|
2
1
|
from letschatty.models.company.assets.chat_assets import ChainOfThoughtInChatTrigger
|
|
3
2
|
from pydantic import BaseModel, Field, model_validator
|
|
4
|
-
from typing import Dict, Any, List, Optional
|
|
3
|
+
from typing import Dict, Any, List, Optional
|
|
5
4
|
|
|
6
5
|
from letschatty.models.base_models.ai_agent_component import AiAgentComponentType
|
|
7
6
|
from letschatty.models.utils.types.identifier import StrObjectId
|
|
8
7
|
from .lambda_invokation_types import InvokationType, LambdaAiEvent
|
|
9
|
-
from .expected_output import ExpectedOutputIncomingMessage,
|
|
10
|
-
from ...models.company.assets.ai_agents_v2.ai_agents_decision_output import IncomingMessageDecisionAction
|
|
8
|
+
from .expected_output import ExpectedOutputIncomingMessage, ExpectedOutputSmartTag, ExpectedOutputQualityTest, IncomingMessageAIDecision
|
|
9
|
+
from ...models.company.assets.ai_agents_v2.ai_agents_decision_output import IncomingMessageDecisionAction
|
|
11
10
|
|
|
12
11
|
class SmartTaggingCallbackMetadata(BaseModel):
|
|
13
12
|
chat_id: StrObjectId
|
|
14
13
|
company_id: StrObjectId
|
|
15
|
-
trigger: ChainOfThoughtInChatTrigger
|
|
16
14
|
|
|
17
15
|
class ComparisonAnalysisCallbackMetadata(BaseModel):
|
|
18
16
|
test_case_id: StrObjectId
|
|
@@ -24,8 +22,21 @@ class InteractionCallbackMetadata(BaseModel):
|
|
|
24
22
|
ai_agent_id: StrObjectId
|
|
25
23
|
company_id: StrObjectId
|
|
26
24
|
interaction_index: int
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
|
|
26
|
+
class IncomingMessageCallbackMetadata(BaseModel):
|
|
27
|
+
chat_id: StrObjectId
|
|
28
|
+
company_id: StrObjectId
|
|
29
|
+
ai_agent_id: StrObjectId
|
|
30
|
+
cot_id: StrObjectId
|
|
31
|
+
trigger: str
|
|
32
|
+
# Trigger info is in: incoming_message_ids for user_message,
|
|
33
|
+
# triggered_by_user_id for manual_trigger, smart_follow_up_id for follow_up
|
|
34
|
+
triggered_by_user_id: Optional[StrObjectId] = None
|
|
35
|
+
|
|
36
|
+
class IncomingMessageCallbackEvent(LambdaAiEvent):
|
|
37
|
+
type: InvokationType = InvokationType.INCOMING_MESSAGE_CALLBACK
|
|
38
|
+
data: IncomingMessageAIDecision
|
|
39
|
+
callback_metadata: IncomingMessageCallbackMetadata
|
|
29
40
|
|
|
30
41
|
class QualityTestCallbackEvent(LambdaAiEvent):
|
|
31
42
|
type: InvokationType = InvokationType.SINGLE_QUALITY_TEST_CALLBACK
|
|
@@ -43,50 +54,6 @@ class QualityTestInteractionCallbackEvent(LambdaAiEvent):
|
|
|
43
54
|
data["data"]["chain_of_thought"]["chatty_ai_agent_id"] = data["callback_metadata"]["ai_agent_id"]
|
|
44
55
|
return data
|
|
45
56
|
|
|
46
|
-
@model_validator(mode="before")
|
|
47
|
-
@classmethod
|
|
48
|
-
def set_chain_of_thought_id(cls, values: Dict[str, Any]):
|
|
49
|
-
"""
|
|
50
|
-
Get the chain_of_thought_id from callback_metadata and set it in data.chain_of_thought.id
|
|
51
|
-
|
|
52
|
-
Handles both cases:
|
|
53
|
-
- data is a JSON string (needs parsing)
|
|
54
|
-
- data is already a dict
|
|
55
|
-
"""
|
|
56
|
-
import json
|
|
57
|
-
|
|
58
|
-
data = values.get("data")
|
|
59
|
-
callback_metadata = values.get("callback_metadata")
|
|
60
|
-
|
|
61
|
-
if not data or not callback_metadata:
|
|
62
|
-
return values
|
|
63
|
-
|
|
64
|
-
# Get chain_of_thought_id from callback_metadata (could be dict or object)
|
|
65
|
-
if isinstance(callback_metadata, dict):
|
|
66
|
-
chain_of_thought_id = callback_metadata.get("chain_of_thought_id")
|
|
67
|
-
else:
|
|
68
|
-
chain_of_thought_id = getattr(callback_metadata, "chain_of_thought_id", None)
|
|
69
|
-
|
|
70
|
-
if not chain_of_thought_id:
|
|
71
|
-
return values
|
|
72
|
-
|
|
73
|
-
# Parse data if it's a JSON string
|
|
74
|
-
if isinstance(data, str):
|
|
75
|
-
try:
|
|
76
|
-
data = json.loads(data)
|
|
77
|
-
values["data"] = data
|
|
78
|
-
except (json.JSONDecodeError, TypeError):
|
|
79
|
-
return values
|
|
80
|
-
|
|
81
|
-
# If data is a dict, set the id in chain_of_thought
|
|
82
|
-
if isinstance(data, dict):
|
|
83
|
-
chain_of_thought = data.get("chain_of_thought")
|
|
84
|
-
if isinstance(chain_of_thought, dict):
|
|
85
|
-
chain_of_thought["id"] = chain_of_thought_id
|
|
86
|
-
|
|
87
|
-
return values
|
|
88
|
-
|
|
89
|
-
|
|
90
57
|
class SmartTaggingCallbackEvent(LambdaAiEvent):
|
|
91
58
|
type: InvokationType = InvokationType.SMART_TAGGING_CALLBACK
|
|
92
59
|
data: ExpectedOutputSmartTag
|
|
@@ -110,11 +77,6 @@ class FollowUpEvent(LambdaAiEvent):
|
|
|
110
77
|
type: InvokationType = InvokationType.FOLLOW_UP
|
|
111
78
|
data: ChatData
|
|
112
79
|
|
|
113
|
-
|
|
114
|
-
class SmartFollowUpDecisionOutputEvent(LambdaAiEvent):
|
|
115
|
-
type: InvokationType = InvokationType.FOLLOW_UP
|
|
116
|
-
data: ExpectedOutputSmartFollowUp
|
|
117
|
-
|
|
118
80
|
class QualityTestEventData(BaseModel):
|
|
119
81
|
chat_example_id: StrObjectId
|
|
120
82
|
company_id: StrObjectId
|
|
@@ -168,9 +130,11 @@ class DoubleCheckerCallbackMetadata(BaseModel):
|
|
|
168
130
|
company_id: StrObjectId
|
|
169
131
|
ai_agent_id: StrObjectId
|
|
170
132
|
incoming_messages_ids: List[str]
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
133
|
+
# Trigger info
|
|
134
|
+
trigger: str
|
|
135
|
+
# Trigger info is in: incoming_messages_ids for user_message,
|
|
136
|
+
# triggered_by_user_id for manual_trigger, smart_follow_up_id for follow_up
|
|
137
|
+
triggered_by_user_id: Optional[StrObjectId] = None
|
|
174
138
|
|
|
175
139
|
class DoubleCheckerForIncomingMessagesAnswerEvent(LambdaAiEvent):
|
|
176
140
|
type: InvokationType = InvokationType.DOUBLE_CHECKER_FOR_INCOMING_MESSAGES_ANSWER
|
|
@@ -178,73 +142,13 @@ class DoubleCheckerForIncomingMessagesAnswerEvent(LambdaAiEvent):
|
|
|
178
142
|
|
|
179
143
|
class DoubleCheckerForIncomingMessagesAnswerCallbackEvent(LambdaAiEvent):
|
|
180
144
|
type: InvokationType = InvokationType.DOUBLE_CHECKER_FOR_INCOMING_MESSAGES_ANSWER_CALLBACK
|
|
181
|
-
data:
|
|
145
|
+
data: DoubleCheckerForIncomingMessagesAnswerData
|
|
182
146
|
callback_metadata: DoubleCheckerCallbackMetadata
|
|
183
147
|
|
|
184
|
-
|
|
185
|
-
@classmethod
|
|
186
|
-
def set_chain_of_thought_id(cls, values: Dict[str, Any]):
|
|
187
|
-
"""
|
|
188
|
-
Get the chain_of_thought_id from callback_metadata and set it in data.chain_of_thought.id
|
|
189
|
-
|
|
190
|
-
Handles both cases:
|
|
191
|
-
- data is a JSON string (needs parsing)
|
|
192
|
-
- data is already a dict
|
|
193
|
-
"""
|
|
194
|
-
import json
|
|
195
|
-
|
|
196
|
-
data = values.get("data")
|
|
197
|
-
callback_metadata = values.get("callback_metadata")
|
|
198
|
-
|
|
199
|
-
if not data or not callback_metadata:
|
|
200
|
-
return values
|
|
201
|
-
|
|
202
|
-
# Get chain_of_thought_id from callback_metadata (could be dict or object)
|
|
203
|
-
if isinstance(callback_metadata, dict):
|
|
204
|
-
chain_of_thought_id = callback_metadata.get("chain_of_thought_id")
|
|
205
|
-
else:
|
|
206
|
-
chain_of_thought_id = getattr(callback_metadata, "chain_of_thought_id", None)
|
|
207
|
-
|
|
208
|
-
if not chain_of_thought_id:
|
|
209
|
-
return values
|
|
210
|
-
|
|
211
|
-
# Parse data if it's a JSON string
|
|
212
|
-
if isinstance(data, str):
|
|
213
|
-
try:
|
|
214
|
-
data = json.loads(data)
|
|
215
|
-
values["data"] = data
|
|
216
|
-
except (json.JSONDecodeError, TypeError):
|
|
217
|
-
return values
|
|
218
|
-
|
|
219
|
-
# If data is a dict, set the id in chain_of_thought
|
|
220
|
-
if isinstance(data, dict):
|
|
221
|
-
chain_of_thought = data.get("chain_of_thought")
|
|
222
|
-
if isinstance(chain_of_thought, dict):
|
|
223
|
-
chain_of_thought["id"] = chain_of_thought_id
|
|
224
|
-
|
|
225
|
-
return values
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
# Smart Follow-Up Decision Output Events
|
|
230
|
-
|
|
231
|
-
class SmartFollowUpDecisionOutputData(BaseModel):
|
|
232
|
-
"""Data for smart follow-up decision output"""
|
|
148
|
+
class DoubleCheckerForIncomingMessagesAnswerCallbackMetadata(BaseModel):
|
|
233
149
|
chat_id: StrObjectId
|
|
234
150
|
company_id: StrObjectId
|
|
235
151
|
ai_agent_id: StrObjectId
|
|
236
|
-
smart_follow_up_output: ExpectedOutputSmartFollowUp
|
|
237
|
-
smart_follow_up_id: Optional[StrObjectId] = None
|
|
238
|
-
|
|
239
|
-
class SmartFollowUpDecisionOutputEvent(LambdaAiEvent):
|
|
240
|
-
"""
|
|
241
|
-
Event for smart follow-up decision output.
|
|
242
|
-
|
|
243
|
-
Similar to incoming message decision but for follow-ups.
|
|
244
|
-
Bypasses double checker and sends directly to API.
|
|
245
|
-
"""
|
|
246
|
-
type: InvokationType = InvokationType.SMART_FOLLOW_UP_DECISION_OUTPUT
|
|
247
|
-
data: SmartFollowUpDecisionOutputData
|
|
248
152
|
|
|
249
153
|
|
|
250
154
|
# New AI Agent Context Building Events (for new architecture)
|
|
@@ -279,7 +183,7 @@ class GetChatWithPromptForFollowUpEventData(BaseModel):
|
|
|
279
183
|
"""Data for get chat with prompt for follow-up event"""
|
|
280
184
|
chat_id: StrObjectId
|
|
281
185
|
company_id: StrObjectId
|
|
282
|
-
smart_follow_up_id:
|
|
186
|
+
smart_follow_up_id: StrObjectId
|
|
283
187
|
# Trigger information
|
|
284
188
|
trigger: ChainOfThoughtInChatTrigger
|
|
285
189
|
# trigger_id is derived from: smart_follow_up_id
|
|
@@ -399,8 +303,7 @@ class EscalateAIAgentInChatEventData(BaseModel):
|
|
|
399
303
|
"""Data for escalating an AI agent (requiring human intervention)"""
|
|
400
304
|
chat_id: StrObjectId
|
|
401
305
|
company_id: StrObjectId
|
|
402
|
-
reason:
|
|
403
|
-
message: Optional[str] = Field(default="El agente de IA requiere de tu intervención", description="The message to display to the user if any")
|
|
306
|
+
reason: str = Field(description="Reason for escalation (e.g., 'Complex technical issue', 'Customer request')")
|
|
404
307
|
|
|
405
308
|
|
|
406
309
|
class EscalateAIAgentInChatEvent(LambdaAiEvent):
|
|
@@ -432,24 +335,6 @@ class UnescalateAIAgentInChatEvent(LambdaAiEvent):
|
|
|
432
335
|
data: UnescalateAIAgentInChatEventData
|
|
433
336
|
|
|
434
337
|
|
|
435
|
-
|
|
436
|
-
class GetChainOfThoughtsByChatIdEventData(BaseModel):
|
|
437
|
-
"""Data for getting chain of thoughts by chat ID"""
|
|
438
|
-
chat_id: StrObjectId
|
|
439
|
-
company_id: StrObjectId
|
|
440
|
-
skip: int = Field(default=0, description="Number of results to skip for pagination")
|
|
441
|
-
limit: int = Field(default=10, description="Number of results to return")
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
class GetChainOfThoughtsByChatIdEvent(LambdaAiEvent):
|
|
445
|
-
"""
|
|
446
|
-
Event to get chain of thoughts for a chat.
|
|
447
|
-
|
|
448
|
-
Returns a list of chain of thoughts associated with the given chat ID,
|
|
449
|
-
sorted by created_at (newest first), with pagination support via skip.
|
|
450
|
-
"""
|
|
451
|
-
type: InvokationType = InvokationType.GET_CHAIN_OF_THOUGHTS_BY_CHAT_ID
|
|
452
|
-
data: GetChainOfThoughtsByChatIdEventData
|
|
453
338
|
# Launch Events
|
|
454
339
|
|
|
455
340
|
class LaunchCommunicationEventData(BaseModel):
|
|
@@ -11,14 +11,13 @@ class InvokationType(StrEnum):
|
|
|
11
11
|
SMART_TAGGING_PROMPT = "smart_tagging_prompt"
|
|
12
12
|
QUALITY_TEST_INTERACTION = "quality_test_interaction"
|
|
13
13
|
# Callback-specific types
|
|
14
|
+
INCOMING_MESSAGE_CALLBACK = "incoming_message_callback"
|
|
14
15
|
SINGLE_QUALITY_TEST_CALLBACK = "single_quality_test_callback"
|
|
15
16
|
SMART_TAGGING_CALLBACK = "smart_tagging_callback"
|
|
16
17
|
QUALITY_TESTS_FOR_UPDATED_AI_COMPONENT = "quality_tests_for_updated_ai_component"
|
|
17
18
|
FIX_BUGGED_AI_AGENTS_CALLS_IN_CHATS = "fix_bugged_ai_agents_calls_in_chats"
|
|
18
19
|
DOUBLE_CHECKER_FOR_INCOMING_MESSAGES_ANSWER = "double_checker_for_incoming_messages_answer"
|
|
19
20
|
DOUBLE_CHECKER_FOR_INCOMING_MESSAGES_ANSWER_CALLBACK = "double_checker_for_incoming_messages_answer_callback"
|
|
20
|
-
# Decision output events
|
|
21
|
-
SMART_FOLLOW_UP_DECISION_OUTPUT = "smart_follow_up_decision_output"
|
|
22
21
|
# AI Agent context building events (new architecture)
|
|
23
22
|
GET_CHAT_WITH_PROMPT_INCOMING_MESSAGE = "get_chat_with_prompt_incoming_message"
|
|
24
23
|
GET_CHAT_WITH_PROMPT_FOLLOW_UP = "get_chat_with_prompt_follow_up"
|
|
@@ -31,7 +30,6 @@ class InvokationType(StrEnum):
|
|
|
31
30
|
UPDATE_AI_AGENT_MODE_IN_CHAT = "update_ai_agent_mode_in_chat"
|
|
32
31
|
ESCALATE_AI_AGENT_IN_CHAT = "escalate_ai_agent_in_chat"
|
|
33
32
|
UNESCALATE_AI_AGENT_IN_CHAT = "unescalate_ai_agent_in_chat"
|
|
34
|
-
GET_CHAIN_OF_THOUGHTS_BY_CHAT_ID = "get_chain_of_thoughts_by_chat_id"
|
|
35
33
|
# Launch events
|
|
36
34
|
LAUNCH_COMMUNICATION = "launch_communication"
|
|
37
35
|
LAUNCH_WELCOME_KIT = "launch_welcome_kit"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from letschatty.models.company.assets.chat_assets import ChainOfThoughtInChatTrigger
|
|
2
1
|
from pydantic import BaseModel, Field
|
|
3
2
|
from letschatty.models import StrObjectId
|
|
4
3
|
from letschatty.models.company.assets.ai_agents_v2.chatty_ai_agent import N8NWorkspaceAgentType
|
|
@@ -11,5 +10,4 @@ class SmartFollowUpN8NPayload(BaseModel):
|
|
|
11
10
|
class ManualTriggerN8NPayload(BaseModel):
|
|
12
11
|
chat_id: StrObjectId = Field(description="The id of the chat")
|
|
13
12
|
company_id: StrObjectId = Field(description="The id of the company")
|
|
14
|
-
n8n_agent_type: N8NWorkspaceAgentType = Field(description="The type of agent to redirect the message to")
|
|
15
|
-
trigger: ChainOfThoughtInChatTrigger = Field(default=ChainOfThoughtInChatTrigger.MANUAL_TRIGGER)
|
|
13
|
+
n8n_agent_type: N8NWorkspaceAgentType = Field(description="The type of agent to redirect the message to")
|
{letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/__init__.py
RENAMED
|
@@ -28,5 +28,4 @@ from ...messages.chatty_messages import ChattyMessage
|
|
|
28
28
|
from ...company.CRM.funnel import Funnel, FunnelStage
|
|
29
29
|
from ...utils.types import Status
|
|
30
30
|
from .chat_based_events.chat_based_event import CustomerEventData
|
|
31
|
-
from .chat_based_events.ai_agent_chat import ChattyAIChatEvent, ChattyAIChatData
|
|
32
|
-
from .chat_based_events.ai_agent_execution_event import AIAgentExecutionEvent, AIAgentExecutionEventData
|
|
31
|
+
from .chat_based_events.ai_agent_chat import ChattyAIChatEvent, ChattyAIChatData
|
|
@@ -70,6 +70,9 @@ class AssetEvent(Event):
|
|
|
70
70
|
EventType.FILTER_CRITERIA_CREATED,
|
|
71
71
|
EventType.FILTER_CRITERIA_UPDATED,
|
|
72
72
|
EventType.FILTER_CRITERIA_DELETED,
|
|
73
|
+
EventType.FORM_FIELD_CREATED,
|
|
74
|
+
EventType.FORM_FIELD_UPDATED,
|
|
75
|
+
EventType.FORM_FIELD_DELETED,
|
|
73
76
|
EventType.COMPANY_CREATED,
|
|
74
77
|
EventType.COMPANY_UPDATED,
|
|
75
78
|
EventType.COMPANY_DELETED
|
|
@@ -86,6 +86,10 @@ EVENT_TO_TYPE_CLASSES = {
|
|
|
86
86
|
EventType.WORKFLOW_CREATED : AssetEvent,
|
|
87
87
|
EventType.WORKFLOW_UPDATED : AssetEvent,
|
|
88
88
|
EventType.WORKFLOW_DELETED : AssetEvent,
|
|
89
|
+
#FORM FIELDS
|
|
90
|
+
EventType.FORM_FIELD_CREATED : AssetEvent,
|
|
91
|
+
EventType.FORM_FIELD_UPDATED : AssetEvent,
|
|
92
|
+
EventType.FORM_FIELD_DELETED : AssetEvent,
|
|
89
93
|
#AGENTS
|
|
90
94
|
EventType.USER_CREATED : UserEvent,
|
|
91
95
|
EventType.USER_UPDATED : UserEvent,
|
{letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/analytics/events/event_types.py
RENAMED
|
@@ -12,51 +12,6 @@ class EventType(StrEnum):
|
|
|
12
12
|
AI_AGENT_ASSIGNED_TO_CHAT = "chat.chatty_ai_agent.assigned_to_chat"
|
|
13
13
|
AI_AGENT_REMOVED_FROM_CHAT = "chat.chatty_ai_agent.removed_from_chat"
|
|
14
14
|
AI_AGENT_UPDATED_ON_CHAT = "chat.chatty_ai_agent.updated_on_chat"
|
|
15
|
-
|
|
16
|
-
#CHATTY AI AGENT EXECUTION EVENTS - 3-level hierarchy for execution tracking
|
|
17
|
-
# Pattern: chatty_ai_agent_in_chat.{operation}.{detail}
|
|
18
|
-
# Note: Execution events are already chat-scoped via CustomerEventData
|
|
19
|
-
|
|
20
|
-
# TRIGGER EVENTS - What initiates AI agent processing
|
|
21
|
-
CHATTY_AI_AGENT_IN_CHAT_TRIGGER_USER_MESSAGE = "chatty_ai_agent_in_chat.trigger.user_message"
|
|
22
|
-
CHATTY_AI_AGENT_IN_CHAT_TRIGGER_FOLLOW_UP = "chatty_ai_agent_in_chat.trigger.follow_up"
|
|
23
|
-
CHATTY_AI_AGENT_IN_CHAT_TRIGGER_MANUAL = "chatty_ai_agent_in_chat.trigger.manual"
|
|
24
|
-
CHATTY_AI_AGENT_IN_CHAT_TRIGGER_RETRY = "chatty_ai_agent_in_chat.trigger.retry"
|
|
25
|
-
|
|
26
|
-
# STATE EVENTS - AI agent state changes
|
|
27
|
-
CHATTY_AI_AGENT_IN_CHAT_STATE_PROCESSING_STARTED = "chatty_ai_agent_in_chat.state.processing_started"
|
|
28
|
-
CHATTY_AI_AGENT_IN_CHAT_STATE_CALL_STARTED = "chatty_ai_agent_in_chat.state.call_started"
|
|
29
|
-
CHATTY_AI_AGENT_IN_CHAT_STATE_ESCALATED = "chatty_ai_agent_in_chat.state.escalated"
|
|
30
|
-
CHATTY_AI_AGENT_IN_CHAT_STATE_UNESCALATED = "chatty_ai_agent_in_chat.state.unescalated"
|
|
31
|
-
|
|
32
|
-
# CALL EVENTS - Outbound calls to services
|
|
33
|
-
CHATTY_AI_AGENT_IN_CHAT_CALL_GET_CHAT_WITH_PROMPT = "chatty_ai_agent_in_chat.call.get_chat_with_prompt"
|
|
34
|
-
CHATTY_AI_AGENT_IN_CHAT_CALL_TAGGER = "chatty_ai_agent_in_chat.call.tagger"
|
|
35
|
-
CHATTY_AI_AGENT_IN_CHAT_CALL_DOUBLE_CHECKER = "chatty_ai_agent_in_chat.call.double_checker"
|
|
36
|
-
CHATTY_AI_AGENT_IN_CHAT_CALL_DEBUGGER = "chatty_ai_agent_in_chat.call.debugger"
|
|
37
|
-
|
|
38
|
-
# CALLBACK EVENTS - Responses received from services
|
|
39
|
-
CHATTY_AI_AGENT_IN_CHAT_CALLBACK_GET_CHAT_WITH_PROMPT = "chatty_ai_agent_in_chat.callback.get_chat_with_prompt"
|
|
40
|
-
CHATTY_AI_AGENT_IN_CHAT_CALLBACK_TAGGER = "chatty_ai_agent_in_chat.callback.tagger"
|
|
41
|
-
CHATTY_AI_AGENT_IN_CHAT_CALLBACK_DOUBLE_CHECKER = "chatty_ai_agent_in_chat.callback.double_checker"
|
|
42
|
-
CHATTY_AI_AGENT_IN_CHAT_CALLBACK_OUTPUT_RECEIVED = "chatty_ai_agent_in_chat.callback.output_received"
|
|
43
|
-
|
|
44
|
-
# DECISION EVENTS - AI agent decisions and actions
|
|
45
|
-
CHATTY_AI_AGENT_IN_CHAT_DECISION_SEND = "chatty_ai_agent_in_chat.decision.send"
|
|
46
|
-
CHATTY_AI_AGENT_IN_CHAT_DECISION_SUGGEST = "chatty_ai_agent_in_chat.decision.suggest"
|
|
47
|
-
CHATTY_AI_AGENT_IN_CHAT_DECISION_ESCALATE = "chatty_ai_agent_in_chat.decision.escalate"
|
|
48
|
-
CHATTY_AI_AGENT_IN_CHAT_DECISION_SKIP = "chatty_ai_agent_in_chat.decision.skip"
|
|
49
|
-
CHATTY_AI_AGENT_IN_CHAT_DECISION_SENT_TO_API = "chatty_ai_agent_in_chat.decision.sent_to_api"
|
|
50
|
-
CHATTY_AI_AGENT_IN_CHAT_DECISION_COMPLETED = "chatty_ai_agent_in_chat.decision.completed"
|
|
51
|
-
|
|
52
|
-
# ERROR EVENTS - Failures and cancellations
|
|
53
|
-
CHATTY_AI_AGENT_IN_CHAT_ERROR_CALL_FAILED = "chatty_ai_agent_in_chat.error.call_failed"
|
|
54
|
-
CHATTY_AI_AGENT_IN_CHAT_ERROR_CALL_CANCELLED = "chatty_ai_agent_in_chat.error.call_cancelled"
|
|
55
|
-
CHATTY_AI_AGENT_IN_CHAT_ERROR_VALIDATION_FAILED = "chatty_ai_agent_in_chat.error.validation_failed"
|
|
56
|
-
|
|
57
|
-
# RATING EVENTS - User feedback
|
|
58
|
-
CHATTY_AI_AGENT_IN_CHAT_RATING_RECEIVED = "chatty_ai_agent_in_chat.rating.received"
|
|
59
|
-
|
|
60
15
|
#PRODUCTS
|
|
61
16
|
PRODUCT_ASSIGNED = "chat.product.assigned"
|
|
62
17
|
PRODUCT_REMOVED = "chat.product.removed"
|
{letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/chat/continuous_conversation.py
RENAMED
|
@@ -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)
|
|
@@ -55,7 +55,7 @@ class SmartFollowUpDecision(BaseModel):
|
|
|
55
55
|
SmartFollowUpDecisionAction.POSTPONE_DELTA_TIME]:
|
|
56
56
|
# Postpone actions don't require messages
|
|
57
57
|
if self.messages is not None and len(self.messages) > 0:
|
|
58
|
-
raise ValueError("Messages are not allowed when action is postpone")
|
|
58
|
+
raise ValueError("Messages are not allowed when action is postpone/postponed")
|
|
59
59
|
else:
|
|
60
60
|
raise ValueError(f"Invalid action: {self.action}")
|
|
61
61
|
|
|
@@ -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()
|
|
@@ -25,7 +25,6 @@ class GetChatWithPromptResponse(BaseModel):
|
|
|
25
25
|
"messages": self.messages,
|
|
26
26
|
"n8n_agent_type": self.chatty_ai_agent.n8n_workspace_agent_type.value if self.chatty_ai_agent else None,
|
|
27
27
|
"n8n_agent_type_parameters": self.chatty_ai_agent.n8n_workspace_agent_type_parameteres.model_dump() if self.chatty_ai_agent else None,
|
|
28
|
-
"ai_agent_id": self.chatty_ai_agent.id if self.chatty_ai_agent else None,
|
|
29
28
|
"phone_number": self.chat.client.get_waid() if self.chat else None,
|
|
30
29
|
"chain_of_thought_id": self.chain_of_thought_id,
|
|
31
30
|
"trigger_id": self.trigger_id
|
|
@@ -5,17 +5,11 @@ Defines the data collection, acceptance criteria, and destination actions
|
|
|
5
5
|
for qualifying/disqualifying users.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from letschatty.models.company.assets.automation import Automation
|
|
9
8
|
from pydantic import BaseModel, Field
|
|
10
9
|
from typing import Optional, List
|
|
11
10
|
from enum import StrEnum
|
|
12
11
|
from letschatty.models.utils.types.identifier import StrObjectId
|
|
13
12
|
|
|
14
|
-
class PostToExternalApiConfig(BaseModel):
|
|
15
|
-
"""Placeholder provisorio"""
|
|
16
|
-
url: str = Field(description="The URL to post to")
|
|
17
|
-
method: str = Field(description="The HTTP method to use")
|
|
18
|
-
api_key: str
|
|
19
13
|
|
|
20
14
|
class PreQualifyDestination(StrEnum):
|
|
21
15
|
"""
|
|
@@ -25,11 +19,8 @@ class PreQualifyDestination(StrEnum):
|
|
|
25
19
|
CALENDAR_SCHEDULER = "calendar_scheduler" # Allow AI agent to schedule meetings
|
|
26
20
|
ESCALATE = "escalate" # Escalate to human
|
|
27
21
|
CUSTOM_MESSAGE = "custom_message" # Send a custom message
|
|
28
|
-
AUTO_ASSIGN_HUMAN_AGENT = "auto_assign_human_agent" #
|
|
29
22
|
CONTINUE = "continue" # Continue normal AI agent flow
|
|
30
|
-
NONE = "none" # Do nothing
|
|
31
|
-
ARCHIVE = "archive"
|
|
32
|
-
POST_TO_EXTERNAL_API = "post_to_external_api"
|
|
23
|
+
NONE = "none" # Do nothing
|
|
33
24
|
|
|
34
25
|
|
|
35
26
|
class PreQualifyFormField(BaseModel):
|
|
@@ -77,10 +68,6 @@ class PreQualifyConfig(BaseModel):
|
|
|
77
68
|
default=None,
|
|
78
69
|
description="Custom message to send when user does NOT qualify (if destination is custom_message or escalate)"
|
|
79
70
|
)
|
|
80
|
-
post_to_external_api : Optional[PostToExternalApiConfig] = Field(
|
|
81
|
-
default=None,
|
|
82
|
-
description="Configuration for posting to an external API"
|
|
83
|
-
)
|
|
84
71
|
|
|
85
72
|
@property
|
|
86
73
|
def has_form_fields(self) -> bool:
|
|
@@ -121,3 +108,4 @@ class PreQualifyConfig(BaseModel):
|
|
|
121
108
|
original_len = len(self.form_fields)
|
|
122
109
|
self.form_fields = [f for f in self.form_fields if f.field_key != field_key]
|
|
123
110
|
return len(self.form_fields) < original_len
|
|
111
|
+
|
{letschatty-0.4.328 → letschatty-0.4.332}/src/letschatty/models/company/assets/automation.py
RENAMED
|
@@ -17,24 +17,6 @@ class Automation(BaseModel):
|
|
|
17
17
|
chain_of_thought : Optional[str] = Field(default=None)
|
|
18
18
|
# client_info: Optional[ClientInfo] = Field(default=None) me gustaría que levante el mail y/o otros atributos
|
|
19
19
|
|
|
20
|
-
@property
|
|
21
|
-
def has_automation(self) -> bool:
|
|
22
|
-
"""
|
|
23
|
-
Check if there's an actual automation defined (tags, products, or flow).
|
|
24
|
-
|
|
25
|
-
Returns:
|
|
26
|
-
bool: True if there's at least one tag, product, or flow defined
|
|
27
|
-
"""
|
|
28
|
-
return (
|
|
29
|
-
len(self.tags) > 0 or
|
|
30
|
-
len(self.products) > 0 or
|
|
31
|
-
len(self.flow) > 0 or
|
|
32
|
-
self.quality_score is not None or
|
|
33
|
-
self.chatty_ai_agent_config is not None or
|
|
34
|
-
self.area is not None or
|
|
35
|
-
self.highlight_description is not None
|
|
36
|
-
)
|
|
37
|
-
|
|
38
20
|
@model_validator(mode='after')
|
|
39
21
|
def check_agent_id(self):
|
|
40
22
|
if self.area == Area.WITH_AGENT and not self.agent_id:
|