File tree 5 files changed +20
-4
lines changed
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)
33
33
persona . allowed_group_ids = [ Group ::AUTO_GROUPS [ :trust_level_0 ] ]
34
34
end
35
35
36
- persona . enabled = ! summarization_personas . include? ( persona_class )
36
+ persona . enabled = persona_class . default_enabled
37
37
persona . priority = true if persona_class == DiscourseAi ::Personas ::General
38
38
end
39
39
Original file line number Diff line number Diff line change 3
3
module DiscourseAi
4
4
module Personas
5
5
class ForumResearcher < Persona
6
+ def self . default_enabled
7
+ false
8
+ end
9
+
6
10
def tools
7
11
[ Tools ::Researcher ]
8
12
end
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ module DiscourseAi
4
4
module Personas
5
5
class Persona
6
6
class << self
7
+ def default_enabled
8
+ true
9
+ end
10
+
7
11
def rag_conversation_chunks
8
12
10
9
13
end
Original file line number Diff line number Diff line change 3
3
module DiscourseAi
4
4
module Personas
5
5
class ShortSummarizer < Persona
6
+ def self . default_enabled
7
+ false
8
+ end
9
+
6
10
def system_prompt
7
11
<<~PROMPT . strip
8
12
You are an advanced summarization bot. Analyze a given conversation and produce a concise,
@@ -23,7 +27,7 @@ def system_prompt
23
27
<output>
24
28
{"summary": "xx"}
25
29
</output>
26
-
30
+
27
31
Where "xx" is replaced by the summary.
28
32
PROMPT
29
33
end
Original file line number Diff line number Diff line change 3
3
module DiscourseAi
4
4
module Personas
5
5
class Summarizer < Persona
6
+ def self . default_enabled
7
+ false
8
+ end
9
+
6
10
def system_prompt
7
11
<<~PROMPT . strip
8
12
You are an advanced summarization bot that generates concise, coherent summaries of provided text.
@@ -18,13 +22,13 @@ def system_prompt
18
22
- Example: link to the 6th post by jane: [agreed with]({resource_url}/6)
19
23
- Example: link to the 13th post by joe: [joe]({resource_url}/13)
20
24
- When formatting usernames either use @USERNAME OR [USERNAME]({resource_url}/POST_NUMBER)
21
-
25
+
22
26
Format your response as a JSON object with a single key named "summary", which has the summary as the value.
23
27
Your output should be in the following format:
24
28
<output>
25
29
{"summary": "xx"}
26
30
</output>
27
-
31
+
28
32
Where "xx" is replaced by the summary.
29
33
PROMPT
30
34
end
You can’t perform that action at this time.
0 commit comments