feat: integrate Moonshot AI model provider and update UI translations

This commit is contained in:
burlinchen 2024-11-18 19:05:07 +08:00
parent b8a278d216
commit 7ffb95e9d0
3 changed files with 37 additions and 70 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -31,42 +31,6 @@ export interface ModelPackage {
}
export const models: { [key: string]: ModelPackage } = {
moonshotChat: {
title: "Moonshot Chat",
description: "Moonshot AI provides high-performance large language models",
refUrl: "https://platform.moonshot.cn/",
params: {
title: "Moonshot-v1-8k",
model: "moonshot-v1-8k",
contextLength: 8192,
},
icon: "moonshot.png",
dimensions: [
{
name: "Context Window",
description: "The size of the model's context window",
options: {
"8K": {
model: "moonshot-v1-8k",
title: "Moonshot-v1-8k",
contextLength: 8192,
},
"32K": {
model: "moonshot-v1-32k",
title: "Moonshot-v1-32k",
contextLength: 32768,
},
"128K": {
model: "moonshot-v1-128k",
title: "Moonshot-v1-128k",
contextLength: 131072,
},
},
},
],
providerOptions: ["moonshot"],
isOpenSource: false,
},
llama31Chat: {
title: "Llama3.1 Chat",
description: "A model from Meta, fine-tuned for chat",
@ -147,39 +111,6 @@ export const models: { [key: string]: ModelPackage } = {
providerOptions: ["ollama", "groq", "llama.cpp"],
isOpenSource: true,
},
moonshotChat: {
title: "Moonshot Chat",
description: "The latest model from Moonshot, fine-tuned for chat",
refUrl: "",
params: {
title: "Moonshot-8b",
model: "moonshot-8b",
contextLength: 8192,
},
icon: "moonshot.png",
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"1b": {
model: "moonshot-1b",
title: "Moonshot-1b",
},
"8b": {
model: "moonshot-8b",
title: "Moonshot-8b",
},
"65b": {
model: "moonshot-65b",
title: "Moonshot-65b",
},
},
},
],
providerOptions: ["ollama", "lmstudio", "llama.cpp"],
isOpenSource: true,
},
deepseek: {
title: "DeepSeek Coder",
description:
@ -251,6 +182,42 @@ export const models: { [key: string]: ModelPackage } = {
providerOptions: ["nebius"],
isOpenSource: true,
},
moonshotChat: {
title: "Moonshot Chat",
description: "Moonshot AI provides high-performance large language models",
refUrl: "https://platform.moonshot.cn/",
params: {
title: "Moonshot-v1-8k",
model: "moonshot-v1-8k",
contextLength: 8192,
},
icon: "moonshot.png",
dimensions: [
{
name: "Context Window",
description: "The size of the model's context window",
options: {
"8K": {
model: "moonshot-v1-8k",
title: "Moonshot-v1-8k",
contextLength: 8192,
},
"32K": {
model: "moonshot-v1-32k",
title: "Moonshot-v1-32k",
contextLength: 32768,
},
"128K": {
model: "moonshot-v1-128k",
title: "Moonshot-v1-128k",
contextLength: 131072,
},
},
},
],
providerOptions: ["moonshot"],
isOpenSource: false,
},
mistralOs: {
title: "Mistral",
description:

View file

@ -126,7 +126,7 @@ export const providers: Partial<Record<ModelProvider, ProviderInfo>> = {
refPage: "moonshot",
apiKeyUrl: "https://docs.moonshot.cn/docs/getting-started",
packages: [
models.moonshotLlama7bChat,
models.moonshotChat,
],
collectInputFor: [
{