mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-26 21:47:31 +00:00
* DEV: Remove the summarization feature Instead, we'll register summarization implementations for OpenAI, Anthropic, and Discourse AI using the API defined in discourse/discourse#21813. Core and chat will implement features on top of these implementations instead of this plugin extending them. * Register instances that contain the model, requiring less site settings
26 lines
825 B
Ruby
26 lines
825 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module Summarization
|
|
class EntryPoint
|
|
def load_files
|
|
require_relative "strategies/anthropic"
|
|
require_relative "strategies/discourse_ai"
|
|
require_relative "strategies/open_ai"
|
|
end
|
|
|
|
def inject_into(plugin)
|
|
[
|
|
Strategies::OpenAi.new("gpt-4"),
|
|
Strategies::OpenAi.new("gpt-3.5-turbo"),
|
|
Strategies::DiscourseAi.new("bart-large-cnn-samsum"),
|
|
Strategies::DiscourseAi.new("flan-t5-base-samsum"),
|
|
Strategies::DiscourseAi.new("long-t5-tglobal-base-16384-book-summary"),
|
|
Strategies::Anthropic.new("claude-v1"),
|
|
Strategies::Anthropic.new("claude-v1-100k"),
|
|
].each { |strategy| plugin.register_summarization_strategy(strategy) }
|
|
end
|
|
end
|
|
end
|
|
end
|