discourse-ai/app/jobs/scheduled
Roman Rizzi ddf2bf7034
DEV: Backfill embeddings concurrently. (#941)
We are adding a new method for generating and storing embeddings in bulk, which relies on `Concurrent::Promises::Future`. Generating an embedding consists of three steps:

Prepare text
HTTP call to retrieve the vector
Save to DB.
Each one is independently executed on whatever thread the pool gives us.

We are bringing a custom thread pool instead of the global executor since we want control over how many threads we spawn to limit concurrency. We also avoid firing thousands of HTTP requests when working with large batches.
2024-11-26 14:12:32 -03:00
..
embeddings_backfill.rb DEV: Backfill embeddings concurrently. (#941) 2024-11-26 14:12:32 -03:00
summaries_backfill.rb FEATURE: Calculate gists from non hot topics too (#958) 2024-11-26 13:44:12 -03:00