From beeb4ce78e3e77995a5976d847be22d9f528b1db Mon Sep 17 00:00:00 2001 From: sijinhui Date: Sat, 7 Sep 2024 23:36:48 +0800 Subject: [PATCH] add model --- app/components/ui-lib.tsx | 7 +++++++ app/constant.ts | 18 +++++++++++++++++- app/icons/Moonshot.svg | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 app/icons/Moonshot.svg diff --git a/app/components/ui-lib.tsx b/app/components/ui-lib.tsx index eb7b70629..bac206535 100644 --- a/app/components/ui-lib.tsx +++ b/app/components/ui-lib.tsx @@ -34,6 +34,10 @@ import { Button, } from "antd"; import { OpenAIOutlined, GoogleOutlined } from "@ant-design/icons"; +// 自定义图标 +import Icon from "@ant-design/icons"; +import MoonShot from "@/app/icons/Moonshot.svg"; + const { Meta } = AntCard; import { CheckCard } from "@ant-design/pro-components"; import { CheckGroupValueType } from "@ant-design/pro-card/es/components/CheckCard/Group"; @@ -613,6 +617,9 @@ export function ModalSelector(props: { if (value.startsWith("claude")) { return ; } + if (value.startsWith("moon")) { + return ; + } return <>; }; diff --git a/app/constant.ts b/app/constant.ts index 058bdd267..0c482b569 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -338,7 +338,11 @@ const tencentModels = [ "hunyuan-vision", ]; -const moonshotModes = ["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"]; +const moonshotModes = [ + "moonshot-v1-8k", + // "moonshot-v1-32k", + // "moonshot-v1-128k" +]; const iflytekModels = [ "general", @@ -446,6 +450,18 @@ export const DEFAULT_MODELS = [ sorted: 3, }, }, + ...moonshotModes.map((name) => ({ + name, + available: true, + sorted: seq++, + describe: "月之暗面,可以试试", + provider: { + id: "moonshot", + providerName: "Moonshot", + providerType: "moonshot", + sorted: 9, + }, + })), { name: "midjourney", describe: "绘图用,不用选", diff --git a/app/icons/Moonshot.svg b/app/icons/Moonshot.svg new file mode 100644 index 000000000..59865a011 --- /dev/null +++ b/app/icons/Moonshot.svg @@ -0,0 +1 @@ + \ No newline at end of file