FEATURE: Add Cohere models to AI helper and automation (#576)
This commit is contained in:
parent
253e0b7b39
commit
b906046aad
|
@ -17,6 +17,8 @@ en:
|
||||||
claude_3_haiku: Claude 3 Haiku
|
claude_3_haiku: Claude 3 Haiku
|
||||||
mixtral_8x7b_instruct_v0_1: Mixtral 8x7B Instruct V0.1
|
mixtral_8x7b_instruct_v0_1: Mixtral 8x7B Instruct V0.1
|
||||||
mistral_7b_instruct_v0_2: Mistral 7B Instruct V0.2
|
mistral_7b_instruct_v0_2: Mistral 7B Instruct V0.2
|
||||||
|
command_r: Cohere Command R
|
||||||
|
command_r_plus: Cohere Command R+
|
||||||
scriptables:
|
scriptables:
|
||||||
llm_report:
|
llm_report:
|
||||||
fields:
|
fields:
|
||||||
|
|
|
@ -19,11 +19,14 @@ module DiscourseAi
|
||||||
id: "mistralai/Mistral-7B-Instruct-v0.2",
|
id: "mistralai/Mistral-7B-Instruct-v0.2",
|
||||||
name: "discourse_automation.ai_models.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)
|
def self.translate_model(model)
|
||||||
return "google:gemini-pro" if model == "gemini-pro"
|
return "google:gemini-pro" if model == "gemini-pro"
|
||||||
return "open_ai:#{model}" if model.start_with? "gpt"
|
return "open_ai:#{model}" if model.start_with? "gpt"
|
||||||
|
return "cohere:#{model}" if model.start_with? "command"
|
||||||
|
|
||||||
if model.start_with? "claude"
|
if model.start_with? "claude"
|
||||||
if DiscourseAi::Completions::Endpoints::AwsBedrock.correctly_configured?(model)
|
if DiscourseAi::Completions::Endpoints::AwsBedrock.correctly_configured?(model)
|
||||||
|
|
|
@ -41,6 +41,7 @@ module DiscourseAi
|
||||||
Llama2-*-chat-hf
|
Llama2-*-chat-hf
|
||||||
Llama2-chat-hf
|
Llama2-chat-hf
|
||||||
],
|
],
|
||||||
|
cohere: %w[command-light command command-r command-r-plus],
|
||||||
open_ai: %w[
|
open_ai: %w[
|
||||||
gpt-3.5-turbo
|
gpt-3.5-turbo
|
||||||
gpt-4
|
gpt-4
|
||||||
|
|
Loading…
Reference in New Issue