diff --git a/config/features.yml b/config/features.yml index 1bb355fc8..7abeb27c1 100644 --- a/config/features.yml +++ b/config/features.yml @@ -61,3 +61,5 @@ enabled: false - name: insert_article_in_reply enabled: false +- name: openai_label_suggestions + enabled: true diff --git a/enterprise/lib/enterprise/integrations/openai_processor_service.rb b/enterprise/lib/enterprise/integrations/openai_processor_service.rb index 8cc481f43..f528135d8 100644 --- a/enterprise/lib/enterprise/integrations/openai_processor_service.rb +++ b/enterprise/lib/enterprise/integrations/openai_processor_service.rb @@ -50,6 +50,8 @@ module Enterprise::Integrations::OpenaiProcessorService end def label_suggestion_body + return unless label_suggestions_enabled? + content = labels_with_messages return nil if content.blank? @@ -64,4 +66,8 @@ module Enterprise::Integrations::OpenaiProcessorService ] }.to_json end + + def label_suggestions_enabled? + hook.account.feature_enabled?(:openai_label_suggestions) + end end