FEATURE: Add creative persona (#231)
This adds a new creative persona that has access to the underlying model and no external integrations. It allows people to use Claude/GPT models in a Discourse agnostic way.
This commit is contained in:
parent
525be42aa5
commit
aa463d64f1
|
@ -113,6 +113,9 @@ en:
|
||||||
researcher:
|
researcher:
|
||||||
name: Researcher
|
name: Researcher
|
||||||
description: "AI Bot with Google access that can research information for you"
|
description: "AI Bot with Google access that can research information for you"
|
||||||
|
creative:
|
||||||
|
name: Creative
|
||||||
|
description: "AI Bot with no external integrations specialized in creative tasks"
|
||||||
default_pm_prefix: "[Untitled AI bot PM]"
|
default_pm_prefix: "[Untitled AI bot PM]"
|
||||||
topic_not_found: "Summary unavailable, topic not found!"
|
topic_not_found: "Summary unavailable, topic not found!"
|
||||||
searching: "Searching for: '%{query}'"
|
searching: "Searching for: '%{query}'"
|
||||||
|
|
|
@ -236,7 +236,7 @@ discourse_ai:
|
||||||
- time
|
- time
|
||||||
ai_bot_enabled_personas:
|
ai_bot_enabled_personas:
|
||||||
type: list
|
type: list
|
||||||
default: "general|artist|sql_helper|settings_explorer|researcher"
|
default: "general|artist|sql_helper|settings_explorer|researcher|creative"
|
||||||
choices:
|
choices:
|
||||||
- general
|
- general
|
||||||
- artist
|
- artist
|
||||||
|
|
|
@ -47,6 +47,7 @@ module DiscourseAi
|
||||||
require_relative "personas/sql_helper"
|
require_relative "personas/sql_helper"
|
||||||
require_relative "personas/settings_explorer"
|
require_relative "personas/settings_explorer"
|
||||||
require_relative "personas/researcher"
|
require_relative "personas/researcher"
|
||||||
|
require_relative "personas/creative"
|
||||||
end
|
end
|
||||||
|
|
||||||
def inject_into(plugin)
|
def inject_into(plugin)
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#frozen_string_literal: true
|
||||||
|
|
||||||
|
module DiscourseAi
|
||||||
|
module AiBot
|
||||||
|
module Personas
|
||||||
|
class Creative < Persona
|
||||||
|
def commands
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
|
||||||
|
def system_prompt
|
||||||
|
<<~PROMPT
|
||||||
|
You are a helpful bot
|
||||||
|
PROMPT
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -8,6 +8,7 @@ module DiscourseAi
|
||||||
personas << Personas::Artist if SiteSetting.ai_stability_api_key.present?
|
personas << Personas::Artist if SiteSetting.ai_stability_api_key.present?
|
||||||
personas << Personas::SettingsExplorer
|
personas << Personas::SettingsExplorer
|
||||||
personas << Personas::Researcher if SiteSetting.ai_google_custom_search_api_key.present?
|
personas << Personas::Researcher if SiteSetting.ai_google_custom_search_api_key.present?
|
||||||
|
personas << Personas::Creative
|
||||||
|
|
||||||
personas_allowed = SiteSetting.ai_bot_enabled_personas.split("|")
|
personas_allowed = SiteSetting.ai_bot_enabled_personas.split("|")
|
||||||
personas.filter { |persona| personas_allowed.include?(persona.to_s.demodulize.underscore) }
|
personas.filter { |persona| personas_allowed.include?(persona.to_s.demodulize.underscore) }
|
||||||
|
|
|
@ -84,6 +84,7 @@ module DiscourseAi::AiBot::Personas
|
||||||
Artist,
|
Artist,
|
||||||
SettingsExplorer,
|
SettingsExplorer,
|
||||||
Researcher,
|
Researcher,
|
||||||
|
Creative,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -92,6 +93,7 @@ module DiscourseAi::AiBot::Personas
|
||||||
General,
|
General,
|
||||||
SqlHelper,
|
SqlHelper,
|
||||||
SettingsExplorer,
|
SettingsExplorer,
|
||||||
|
Creative,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue