FIX: get strategy version through vector_rep (#1028)

This commit is contained in:
Roman Rizzi 2024-12-13 18:49:18 -03:00 committed by GitHub
parent fae1fbc796
commit 1c40a698ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,7 @@ module Jobs
.where(<<~SQL) .where(<<~SQL)
#{table_name}.model_version < #{vector_rep.version} #{table_name}.model_version < #{vector_rep.version}
OR OR
#{table_name}.strategy_version < #{strategy.version} #{table_name}.strategy_version < #{vector_rep.strategy_version}
SQL SQL
.limit(limit - rebaked) .limit(limit - rebaked)
.pluck(:id) .pluck(:id)

View File

@ -25,6 +25,7 @@ RSpec.describe Jobs::EmbeddingsBackfill do
SiteSetting.ai_embeddings_enabled = true SiteSetting.ai_embeddings_enabled = true
SiteSetting.ai_embeddings_discourse_service_api_endpoint = "http://test.com" SiteSetting.ai_embeddings_discourse_service_api_endpoint = "http://test.com"
SiteSetting.ai_embeddings_backfill_batch_size = 1 SiteSetting.ai_embeddings_backfill_batch_size = 1
SiteSetting.ai_embeddings_per_post_enabled = true
Jobs.run_immediately! Jobs.run_immediately!
end end