mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-06-28 10:32:15 +00:00
FIX: Skip embeddings for blank content (#392)
This commit is contained in:
parent
c778592da4
commit
cec9bb8910
@ -108,6 +108,7 @@ module DiscourseAi
|
||||
|
||||
def generate_representation_from(target, persist: true)
|
||||
text = @strategy.prepare_text_from(target, tokenizer, max_sequence_length - 2)
|
||||
return if text.blank?
|
||||
|
||||
new_digest = OpenSSL::Digest::SHA1.hexdigest(text)
|
||||
current_digest = DB.query_single(<<~SQL, target_id: target.id).first
|
||||
|
Loading…
x
Reference in New Issue
Block a user