mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-07 12:08:13 +00:00
792703c942
This adds support for the a Discord bot that can search in a Discourse instance when invoked via slash commands in Discord Guild channel.
18 lines
348 B
Ruby
18 lines
348 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.map { |persona| { name: persona.name, value: persona.id } }
|
|
end
|
|
end
|
|
end
|
|
end
|