discourse-ai/lib/configuration/persona_enumerator.rb
Roman Rizzi 0d60aca6ef
FEATURE: Personas powered summaries. (#1232)
* REFACTOR: Move personas into it's own module.

* WIP: Use personas for summarization

* Prioritize persona default LLM or fallback to newest one

* Simplify summarization strategy

* Keep ai_sumarization_model as a fallback
2025-04-02 12:54:47 -03:00

20 lines
391 B
Ruby

# frozen_string_literal: true
require "enum_site_setting"
module DiscourseAi
module Configuration
class PersonaEnumerator < ::EnumSiteSetting
def self.valid_value?(val)
true
end
def self.values
AiPersona
.all_personas(enabled_only: false)
.map { |persona| { name: persona.name, value: persona.id } }
end
end
end
end