feat: add feature flag for label suggestions
This commit is contained in:
@@ -61,3 +61,5 @@
|
||||
enabled: false
|
||||
- name: insert_article_in_reply
|
||||
enabled: false
|
||||
- name: openai_label_suggestions
|
||||
enabled: true
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user