Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/summarization/fold_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def fold(items, summary, cursor, user, &on_partial_blk)
)

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
Expand Down
5 changes: 5 additions & 0 deletions lib/summarization/strategies/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def summary_extension_prompt(_summary, _texts_to_summarize)
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
Expand Down
4 changes: 4 additions & 0 deletions lib/summarization/strategies/hot_topic_gists.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ def type
AiSummary.summary_types[:gist]
end

def feature
"gists"
end

def targets_data
op_post_number = 1

Expand Down