* Use AR model for embeddings features * endpoints * Embeddings CRUD UI * Add presets. Hide a couple more settings * system specs * Seed embedding definition from old settings * Generate search bit index on the fly. cleanup orphaned data * support for seeded models * Fix run test for new embedding * fix selected model not set correctly
20 lines
331 B
Ruby
20 lines
331 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module Configuration
|
|
class EmbeddingDefsValidator
|
|
def initialize(opts = {})
|
|
@opts = opts
|
|
end
|
|
|
|
def valid_value?(val)
|
|
val.blank? || EmbeddingDefinition.exists?(id: val)
|
|
end
|
|
|
|
def error_message
|
|
""
|
|
end
|
|
end
|
|
end
|
|
end
|