FEATURE: Try to generate embeddings for a topic when those aren't found (#23)

This commit is contained in:
Rafael dos Santos Silva 2023-03-21 18:20:46 -03:00 committed by GitHub
parent 55182ca0f5
commit bd342f538d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ module DiscourseAi
end
rescue StandardError => e
Rails.logger.error("SemanticSuggested: #{e}")
Jobs.enqueue(:generate_embeddings, topic_id: topic.id)
return { result: [], params: {} }
end