mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-07 12:53:27 +08:00
10 lines
288 B
Ruby
10 lines
288 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module Embeddings
|
|
def self.enabled?
|
|
SiteSetting.ai_embeddings_enabled && SiteSetting.ai_embeddings_selected_model.present? &&
|
|
EmbeddingDefinition.exists?(id: SiteSetting.ai_embeddings_selected_model)
|
|
end
|
|
end
|
|
end
|