1
0
mirror of synced 2026-08-05 15:26:55 +00:00

FEATURE: Add Cohere models to AI helper and automation (#576)

This commit is contained in:
Sam
2024-04-12 14:46:58 +10:00
committed by GitHub
parent 253e0b7b39
commit b906046aad
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -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:
+3
View File
@@ -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)
+1
View File
@@ -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