mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-07-16 11:36:23 +08: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.
16 lines
424 B
Ruby
16 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
|