mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-07 12:08:13 +00:00
95762723de
* PERF: Preload only gists when including summaries in topic list * Add unique index on summaries and dedup existing records * Make hot topics batch size setting hidden
17 lines
359 B
Ruby
17 lines
359 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module TopicExtensions
|
|
extend ActiveSupport::Concern
|
|
|
|
prepended do
|
|
has_many :ai_summaries, as: :target
|
|
|
|
has_one :ai_gist_summary,
|
|
-> { where(summary_type: AiSummary.summary_types[:gist]) },
|
|
class_name: "AiSummary",
|
|
as: :target
|
|
end
|
|
end
|
|
end
|