mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
17 lines
333 B
Ruby
17 lines
333 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
require "enum_site_setting"
|
||
|
|
||
|
class SummarizationStrategy < EnumSiteSetting
|
||
|
def self.valid_value?(val)
|
||
|
true
|
||
|
end
|
||
|
|
||
|
def self.values
|
||
|
@values ||=
|
||
|
Summarization::Base.available_strategies.map do |strategy|
|
||
|
{ name: strategy.display_name, value: strategy.model }
|
||
|
end
|
||
|
end
|
||
|
end
|