This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Expand file tree Collapse file tree 5 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def from_setting(setting_name)
3333 persona . allowed_group_ids = [ Group ::AUTO_GROUPS [ :trust_level_0 ] ]
3434 end
3535
36- persona . enabled = ! summarization_personas . include? ( persona_class )
36+ persona . enabled = persona_class . default_enabled
3737 persona . priority = true if persona_class == DiscourseAi ::Personas ::General
3838 end
3939
Original file line number Diff line number Diff line change 33module DiscourseAi
44 module Personas
55 class ForumResearcher < Persona
6+ def self . default_enabled
7+ false
8+ end
9+
610 def tools
711 [ Tools ::Researcher ]
812 end
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ module DiscourseAi
44 module Personas
55 class Persona
66 class << self
7+ def default_enabled
8+ true
9+ end
10+
711 def rag_conversation_chunks
812 10
913 end
Original file line number Diff line number Diff line change 33module DiscourseAi
44 module Personas
55 class ShortSummarizer < Persona
6+ def self . default_enabled
7+ false
8+ end
9+
610 def system_prompt
711 <<~PROMPT . strip
812 You are an advanced summarization bot. Analyze a given conversation and produce a concise,
@@ -23,7 +27,7 @@ def system_prompt
2327 <output>
2428 {"summary": "xx"}
2529 </output>
26-
30+
2731 Where "xx" is replaced by the summary.
2832 PROMPT
2933 end
Original file line number Diff line number Diff line change 33module DiscourseAi
44 module Personas
55 class Summarizer < Persona
6+ def self . default_enabled
7+ false
8+ end
9+
610 def system_prompt
711 <<~PROMPT . strip
812 You are an advanced summarization bot that generates concise, coherent summaries of provided text.
@@ -18,13 +22,13 @@ def system_prompt
1822 - Example: link to the 6th post by jane: [agreed with]({resource_url}/6)
1923 - Example: link to the 13th post by joe: [joe]({resource_url}/13)
2024 - When formatting usernames either use @USERNAME OR [USERNAME]({resource_url}/POST_NUMBER)
21-
25+
2226 Format your response as a JSON object with a single key named "summary", which has the summary as the value.
2327 Your output should be in the following format:
2428 <output>
2529 {"summary": "xx"}
2630 </output>
27-
31+
2832 Where "xx" is replaced by the summary.
2933 PROMPT
3034 end
You can’t perform that action at this time.
0 commit comments