2023-02-17 09:33:47 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-02-22 18:46:53 -05:00
|
|
|
# name: discourse-ai
|
2023-02-17 09:33:47 -05:00
|
|
|
# about: TODO
|
|
|
|
# version: 0.0.1
|
|
|
|
# authors: Discourse
|
|
|
|
# url: TODO
|
|
|
|
# required_version: 2.7.0
|
|
|
|
|
2023-02-23 09:08:34 -05:00
|
|
|
enabled_site_setting :discourse_ai_enabled
|
2023-02-17 09:33:47 -05:00
|
|
|
|
2023-02-24 05:53:43 -05:00
|
|
|
after_initialize do
|
|
|
|
module ::DiscourseAI
|
|
|
|
PLUGIN_NAME = "discourse-ai"
|
|
|
|
end
|
2023-02-22 18:46:53 -05:00
|
|
|
|
2023-02-24 05:53:43 -05:00
|
|
|
require_relative "lib/shared/inference_manager"
|
|
|
|
require_relative "lib/shared/flag_manager"
|
|
|
|
|
|
|
|
require_relative "lib/modules/nsfw/entry_point"
|
|
|
|
require_relative "lib/modules/toxicity/entry_point"
|
|
|
|
require_relative "lib/modules/sentiment/entry_point"
|
2023-02-22 18:46:53 -05:00
|
|
|
|
2023-02-23 10:25:00 -05:00
|
|
|
modules = [
|
2023-02-23 13:50:10 -05:00
|
|
|
DiscourseAI::NSFW::EntryPoint.new,
|
|
|
|
DiscourseAI::Toxicity::EntryPoint.new,
|
|
|
|
DiscourseAI::Sentiment::EntryPoint.new,
|
2023-02-23 10:25:00 -05:00
|
|
|
]
|
2023-02-23 09:08:34 -05:00
|
|
|
|
2023-02-23 13:50:10 -05:00
|
|
|
modules.each do |a_module|
|
|
|
|
a_module.load_files
|
|
|
|
a_module.inject_into(self)
|
|
|
|
end
|
2023-02-22 18:46:53 -05:00
|
|
|
end
|