feat: don't allow notes and faq service is captain limits have exceeded

This commit is contained in:
Shivam Mishra
2025-01-20 15:39:25 +05:30
parent 493f9a75e7
commit f1cdfc660e
+1 -3
View File
@@ -1,9 +1,7 @@
class CaptainListener < BaseListener
def conversation_resolved(event)
conversation = extract_conversation_and_account(event)[0]
assistant = conversation.inbox.captain_assistant
return if assistant.blank?
return unless conversation.inbox.captain_active?
Captain::Llm::ContactNotesService.new(assistant, conversation).generate_and_update_notes if assistant.config['feature_memory'].present?
Captain::Llm::ConversationFaqService.new(assistant, conversation).generate_and_deduplicate if assistant.config['feature_faq'].present?