1
0
mirror of synced 2026-08-05 23:36:55 +00:00
Files

20 lines
395 B
Ruby
Raw Permalink Normal View History

2025-01-21 12:23:19 -03:00
# frozen_string_literal: true
module DiscourseAi
module Configuration
class EmbeddingDefsValidator
def initialize(opts = {})
@opts = opts
end
def valid_value?(val)
val.present? || !SiteSetting.ai_embeddings_enabled
2025-01-21 12:23:19 -03:00
end
def error_message
I18n.t("discourse_ai.embeddings.configuration.disable_embeddings")
2025-01-21 12:23:19 -03:00
end
end
end
end