useSuggestion(prompt)"
>
- {{ prompt.label }}
+ {{ t(prompt.label) }}
diff --git a/app/javascript/dashboard/i18n/locale/en/integrations.json b/app/javascript/dashboard/i18n/locale/en/integrations.json
index ed56b1669..14e1506b4 100644
--- a/app/javascript/dashboard/i18n/locale/en/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/en/integrations.json
@@ -331,7 +331,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ml/integrations.json b/app/javascript/dashboard/i18n/locale/ml/integrations.json
index b08a033b2..38f7a6f43 100644
--- a/app/javascript/dashboard/i18n/locale/ml/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ml/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "ഈ സംവാദം സംക്ഷേപിക്കുക",
+ "CONTENT": "ഉപഭോക്താവും സഹായ ഏജന്റും തമ്മിലുള്ള സംവാദത്തിലെ പ്രധാന വിഷയങ്ങൾ സംക്ഷേപിക്കുക. ഉപഭോക്താവിന്റെ ആശങ്കകൾ, ചോദ്യങ്ങൾ, ഏജന്റിന്റെ മറുപടികൾ എന്നിവ ഉൾപ്പെടണം."
+ },
+ "SUGGEST": {
+ "LABEL": "ഒരു മറുപടി നിർദ്ദേശിക്കുക",
+ "CONTENT": "ഉപഭോക്താവിന്റെ ചോദ്യങ്ങൾ വിശകലനം ചെയ്ത്, അവരുടെ ആശങ്കകൾക്കും ചോദ്യങ്ങൾക്കും യോജിച്ചുള്ള ഒരു വ്യക്തവും ഉപകാരപ്രദവുമായ മറുപടി രൂപപ്പെടുത്തുക."
+ },
+ "RATE": {
+ "LABEL": "ഈ സംവാദം റേറ്റുചെയ്യുക",
+ "CONTENT": "ഉപഭോക്താവിന്റെ ആവശ്യങ്ങൾ എത്രമാത്രം നല്ല രീതിയിൽ നിറവേറ്റിയെന്ന് വിലയിരുത്തുക. സംഭാഷണത്തിന്റെ സ്വരം, വ്യക്തത, കാര്യക്ഷമത എന്നിവയുടെ അടിസ്ഥാനത്തിൽ 5ൽ എത്രയാണെന്ന് റേറ്റുചെയ്യുക."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/jobs/internal/process_stale_contacts_job.rb b/app/jobs/internal/process_stale_contacts_job.rb
index eaf53be75..a40e73a01 100644
--- a/app/jobs/internal/process_stale_contacts_job.rb
+++ b/app/jobs/internal/process_stale_contacts_job.rb
@@ -8,6 +8,8 @@ class Internal::ProcessStaleContactsJob < ApplicationJob
queue_as :scheduled_jobs
def perform
+ return unless ChatwootApp.chatwoot_cloud?
+
Account.find_in_batches(batch_size: 100) do |accounts|
accounts.each do |account|
Rails.logger.info "Enqueuing RemoveStaleContactsJob for account #{account.id}"
diff --git a/config/schedule.yml b/config/schedule.yml
index f86015de6..afb9d98c7 100644
--- a/config/schedule.yml
+++ b/config/schedule.yml
@@ -33,9 +33,9 @@ remove_stale_redis_keys_job.rb:
class: 'Internal::RemoveStaleRedisKeysJob'
queue: scheduled_jobs
-# executed daily at 2230 UTC
-# which is our lowest traffic time
-# process_stale_contacts_job:
-# cron: '30 22 * * *'
-# class: 'Internal::ProcessStaleContactsJob'
-# queue: scheduled_jobs
+#executed daily at 0430 UTC
+# which will be IST 10:00 AM
+process_stale_contacts_job:
+ cron: '30 04 * * *'
+ class: 'Internal::ProcessStaleContactsJob'
+ queue: scheduled_jobs
diff --git a/spec/jobs/internal/process_stale_contacts_job_spec.rb b/spec/jobs/internal/process_stale_contacts_job_spec.rb
index 30648ce9a..412ee06cc 100644
--- a/spec/jobs/internal/process_stale_contacts_job_spec.rb
+++ b/spec/jobs/internal/process_stale_contacts_job_spec.rb
@@ -4,11 +4,13 @@ RSpec.describe Internal::ProcessStaleContactsJob do
subject(:job) { described_class.perform_later }
it 'enqueues the job' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(true)
expect { job }.to have_enqueued_job(described_class)
.on_queue('scheduled_jobs')
end
it 'enqueues RemoveStaleContactsJob for each account' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(true)
account1 = create(:account)
account2 = create(:account)
account3 = create(:account)
@@ -25,10 +27,20 @@ RSpec.describe Internal::ProcessStaleContactsJob do
end
it 'processes accounts in batches' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(true)
account = create(:account)
allow(Account).to receive(:find_in_batches).with(batch_size: 100).and_yield([account])
expect(Internal::RemoveStaleContactsJob).to receive(:perform_later).with(account)
described_class.perform_now
end
+
+ it 'does not process accounts when not in cloud environment' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(false)
+ create(:account)
+
+ expect(Account).not_to receive(:find_in_batches)
+ expect(Internal::RemoveStaleContactsJob).not_to receive(:perform_later)
+ described_class.perform_now
+ end
end