mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-07-16 11:36:23 +08:00
19 lines
379 B
Ruby
19 lines
379 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "enum_site_setting"
|
|
|
|
module DiscourseAi
|
|
module Configuration
|
|
class AgentEnumerator < ::EnumSiteSetting
|
|
def self.valid_value?(val)
|
|
true
|
|
end
|
|
|
|
def self.values
|
|
AiAgent
|
|
.all_agents(enabled_only: false)
|
|
.map { |agent| { name: agent.name, value: agent.id } }
|
|
end
|
|
end
|
|
end
|
|
end
|