mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-08 23:32:45 +00:00
* 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
14 lines
397 B
Ruby
14 lines
397 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ::Jobs
|
|
class ManageEmbeddingDefSearchIndex < ::Jobs::Base
|
|
def execute(args)
|
|
embedding_def = EmbeddingDefinition.find_by(id: args[:id])
|
|
return if embedding_def.nil?
|
|
return if DiscourseAi::Embeddings::Schema.correctly_indexed?(embedding_def)
|
|
|
|
DiscourseAi::Embeddings::Schema.prepare_search_indexes(embedding_def)
|
|
end
|
|
end
|
|
end
|