mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-01 23:09:19 +00:00
This change introduces a job to summarize topics and cache the results automatically. We provide a setting to control how many topics we'll backfill per hour and what the topic's minimum word count is to qualify. We'll prioritize topics without summary over outdated ones.
17 lines
424 B
Ruby
17 lines
424 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:ai_summary) do
|
|
summarized_text "complete summary"
|
|
original_content_sha "123"
|
|
algorithm "test"
|
|
target { Fabricate(:topic) }
|
|
summary_type AiSummary.summary_types[:complete]
|
|
origin AiSummary.origins[:human]
|
|
end
|
|
|
|
Fabricator(:topic_ai_gist, from: :ai_summary) do
|
|
summarized_text "gist"
|
|
summary_type AiSummary.summary_types[:gist]
|
|
origin AiSummary.origins[:system]
|
|
end
|