diff --git a/lib/summarization/fold_content.rb b/lib/summarization/fold_content.rb index da3880d8..23cf225f 100644 --- a/lib/summarization/fold_content.rb +++ b/lib/summarization/fold_content.rb @@ -128,10 +128,10 @@ module DiscourseAi ) if cursor == items.length - llm.generate(prompt, user: user, feature_name: "summarize", &on_partial_blk) + llm.generate(prompt, user: user, feature_name: strategy.feature, &on_partial_blk) else latest_summary = - llm.generate(prompt, user: user, max_tokens: 600, feature_name: "summarize") + llm.generate(prompt, user: user, max_tokens: 600, feature_name: strategy.feature) fold(items, latest_summary, cursor, user, &on_partial_blk) end end diff --git a/lib/summarization/strategies/base.rb b/lib/summarization/strategies/base.rb index b4b1dbfd..f9a5e182 100644 --- a/lib/summarization/strategies/base.rb +++ b/lib/summarization/strategies/base.rb @@ -42,6 +42,11 @@ module DiscourseAi def first_summary_prompt(_input) raise NotImplementedError end + + # We'll pass this as the feature_name when doing LLM calls. + def feature + "summarize" + end end end end diff --git a/lib/summarization/strategies/hot_topic_gists.rb b/lib/summarization/strategies/hot_topic_gists.rb index 4868c407..e0271be6 100644 --- a/lib/summarization/strategies/hot_topic_gists.rb +++ b/lib/summarization/strategies/hot_topic_gists.rb @@ -8,6 +8,10 @@ module DiscourseAi AiSummary.summary_types[:gist] end + def feature + "gists" + end + def targets_data op_post_number = 1