diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 967f4476..1545b016 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -17,6 +17,8 @@ en: claude_3_haiku: Claude 3 Haiku mixtral_8x7b_instruct_v0_1: Mixtral 8x7B Instruct V0.1 mistral_7b_instruct_v0_2: Mistral 7B Instruct V0.2 + command_r: Cohere Command R + command_r_plus: Cohere Command R+ scriptables: llm_report: fields: diff --git a/lib/automation.rb b/lib/automation.rb index 15426ef8..eb561e0d 100644 --- a/lib/automation.rb +++ b/lib/automation.rb @@ -19,11 +19,14 @@ module DiscourseAi id: "mistralai/Mistral-7B-Instruct-v0.2", name: "discourse_automation.ai_models.mistral_7b_instruct_v0_2", }, + { id: "command-r", name: "discourse_automation.ai_models.command_r" }, + { id: "command-r-plus", name: "discourse_automation.ai_models.command_r_plus" }, ] def self.translate_model(model) return "google:gemini-pro" if model == "gemini-pro" return "open_ai:#{model}" if model.start_with? "gpt" + return "cohere:#{model}" if model.start_with? "command" if model.start_with? "claude" if DiscourseAi::Completions::Endpoints::AwsBedrock.correctly_configured?(model) diff --git a/lib/completions/llm.rb b/lib/completions/llm.rb index 9f48d24e..3e10109e 100644 --- a/lib/completions/llm.rb +++ b/lib/completions/llm.rb @@ -41,6 +41,7 @@ module DiscourseAi Llama2-*-chat-hf Llama2-chat-hf ], + cohere: %w[command-light command command-r command-r-plus], open_ai: %w[ gpt-3.5-turbo gpt-4