From 0dcda9822ef5311ac9ccfd06f46d296d70848d52 Mon Sep 17 00:00:00 2001 From: heheer Date: Sat, 12 Oct 2024 09:59:16 +0800 Subject: [PATCH] change app template default author (#2893) --- projects/app/public/appMarketTemplates/CQ/template.json | 2 +- .../public/appMarketTemplates/TranslateRobot/template.json | 2 +- .../app/public/appMarketTemplates/chatGuide/template.json | 2 +- projects/app/public/appMarketTemplates/flux/template.json | 2 +- projects/app/public/appMarketTemplates/google/template.json | 2 +- .../app/public/appMarketTemplates/plugin-dalle/template.json | 2 +- .../app/public/appMarketTemplates/plugin-feishu/template.json | 2 +- .../public/appMarketTemplates/simpleDatasetChat/template.json | 2 +- .../app/public/appMarketTemplates/srt-translate/template.json | 2 +- projects/app/public/appMarketTemplates/timeBot/template.json | 2 +- .../components/SimpleApp/components/ToolSelectModal.tsx | 2 +- projects/app/src/pages/app/list/components/CreateModal.tsx | 4 +++- .../app/src/pages/app/list/components/TemplateMarketModal.tsx | 2 +- 13 files changed, 15 insertions(+), 13 deletions(-) diff --git a/projects/app/public/appMarketTemplates/CQ/template.json b/projects/app/public/appMarketTemplates/CQ/template.json index 2b7417c33..08f9b94bf 100644 --- a/projects/app/public/appMarketTemplates/CQ/template.json +++ b/projects/app/public/appMarketTemplates/CQ/template.json @@ -1,7 +1,7 @@ { "name": "问题分类 + 知识库", "intro": "先对用户的问题进行分类,再根据不同类型问题,执行不同的操作", - "author": "FastGPT", + "author": "", "avatar": "core/workflow/template/questionClassify", "tags": ["office-services"], "type": "advanced", diff --git a/projects/app/public/appMarketTemplates/TranslateRobot/template.json b/projects/app/public/appMarketTemplates/TranslateRobot/template.json index 3abd78ff6..d83756887 100644 --- a/projects/app/public/appMarketTemplates/TranslateRobot/template.json +++ b/projects/app/public/appMarketTemplates/TranslateRobot/template.json @@ -1,7 +1,7 @@ { "name": "多轮翻译机器人", "intro": "通过 4 轮翻译,提高翻译英文的质量", - "author": "FastGPT", + "author": "", "avatar": "/appMarketTemplates/TranslateRobot/avatar.svg", "tags": ["office-services"], "type": "advanced", diff --git a/projects/app/public/appMarketTemplates/chatGuide/template.json b/projects/app/public/appMarketTemplates/chatGuide/template.json index 65fa8c8d5..c682b8cc6 100644 --- a/projects/app/public/appMarketTemplates/chatGuide/template.json +++ b/projects/app/public/appMarketTemplates/chatGuide/template.json @@ -1,7 +1,7 @@ { "name": "对话引导 + 变量", "intro": "可以在对话开始发送一段提示,或者让用户填写一些内容,作为本次对话的变量", - "author": "FastGPT", + "author": "", "avatar": "core/workflow/template/systemConfig", "tags": ["office-services"], "type": "simple", diff --git a/projects/app/public/appMarketTemplates/flux/template.json b/projects/app/public/appMarketTemplates/flux/template.json index c8277f78f..b23100b4f 100644 --- a/projects/app/public/appMarketTemplates/flux/template.json +++ b/projects/app/public/appMarketTemplates/flux/template.json @@ -1,7 +1,7 @@ { "name": "Flux 绘图", "intro": "通过请求 Flux 接口绘图,需要有 api key", - "author": "FastGPT", + "author": "", "avatar": "/appMarketTemplates/flux/avatar.svg", "type": "plugin", "tags": ["image-generation"], diff --git a/projects/app/public/appMarketTemplates/google/template.json b/projects/app/public/appMarketTemplates/google/template.json index 8da3227cb..e93035c48 100644 --- a/projects/app/public/appMarketTemplates/google/template.json +++ b/projects/app/public/appMarketTemplates/google/template.json @@ -1,7 +1,7 @@ { "name": "谷歌搜索", "intro": "通过请求谷歌搜索,查询相关内容作为模型的参考。", - "author": "FastGPT", + "author": "", "avatar": "/appMarketTemplates/google/avatar.svg", "tags": ["recommendation", "web-search"], "type": "advanced", diff --git a/projects/app/public/appMarketTemplates/plugin-dalle/template.json b/projects/app/public/appMarketTemplates/plugin-dalle/template.json index b253e6bec..53bb5533d 100644 --- a/projects/app/public/appMarketTemplates/plugin-dalle/template.json +++ b/projects/app/public/appMarketTemplates/plugin-dalle/template.json @@ -1,7 +1,7 @@ { "name": "Dalle3 绘图", "intro": "通过请求 Dalle3 接口绘图,需要有 api key", - "author": "FastGPT", + "author": "", "avatar": "/appMarketTemplates/plugin-dalle/avatar.svg", "type": "plugin", "tags": ["recommendation", "image-generation"], diff --git a/projects/app/public/appMarketTemplates/plugin-feishu/template.json b/projects/app/public/appMarketTemplates/plugin-feishu/template.json index a10785c92..4cca190ef 100644 --- a/projects/app/public/appMarketTemplates/plugin-feishu/template.json +++ b/projects/app/public/appMarketTemplates/plugin-feishu/template.json @@ -1,7 +1,7 @@ { "name": "飞书 webhook 插件", "intro": "通过 webhook 给飞书机器人发送一条消息", - "author": "FastGPT", + "author": "", "avatar": "/appMarketTemplates/plugin-feishu/avatar.svg", "type": "plugin", "tags": ["recommendation", "office-services"], diff --git a/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json b/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json index 71859d764..44aa3de53 100644 --- a/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json +++ b/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json @@ -1,7 +1,7 @@ { "name": "知识库+对话引导", "intro": "每次提问时进行一次知识库搜索,将搜索结果注入 LLM 模型进行参考回答", - "author": "FastGPT", + "author": "", "avatar": "core/workflow/template/datasetSearch", "type": "simple", "tags": ["office-services"], diff --git a/projects/app/public/appMarketTemplates/srt-translate/template.json b/projects/app/public/appMarketTemplates/srt-translate/template.json index 4fa2885f5..f38c76c45 100644 --- a/projects/app/public/appMarketTemplates/srt-translate/template.json +++ b/projects/app/public/appMarketTemplates/srt-translate/template.json @@ -1,7 +1,7 @@ { "name": "长字幕反思翻译机器人", "intro": "利用 AI 自我反思提升翻译质量,同时循环迭代执行 AI 工作流来突破 LLM tokens 限制,实现一个高效的长字幕翻译机器人", - "author": "FastGPT", + "author": "", "avatar": "/appMarketTemplates/TranslateRobot/avatar.svg", "tags": ["office-services"], "type": "advanced", diff --git a/projects/app/public/appMarketTemplates/timeBot/template.json b/projects/app/public/appMarketTemplates/timeBot/template.json index 79d5fc059..746772fc2 100644 --- a/projects/app/public/appMarketTemplates/timeBot/template.json +++ b/projects/app/public/appMarketTemplates/timeBot/template.json @@ -1,7 +1,7 @@ { "name": "知道时间的机器人", "intro": "通过挂载时间插件,让模型获取当前最新时间", - "author": "FastGPT", + "author": "", "avatar": "core/workflow/template/getTime", "tags": ["recommendation", "roleplay"], "type": "simple", diff --git a/projects/app/src/pages/app/detail/components/SimpleApp/components/ToolSelectModal.tsx b/projects/app/src/pages/app/detail/components/SimpleApp/components/ToolSelectModal.tsx index 4752fa03c..474fc2310 100644 --- a/projects/app/src/pages/app/detail/components/SimpleApp/components/ToolSelectModal.tsx +++ b/projects/app/src/pages/app/detail/components/SimpleApp/components/ToolSelectModal.tsx @@ -309,7 +309,7 @@ const RenderList = React.memo(function RenderList({ {item.author !== undefined && ( - {`by ${item.author || feConfigs.systemTitle}`} + {`By ${item.author || feConfigs.systemTitle}`} )} {selected ? ( diff --git a/projects/app/src/pages/app/list/components/CreateModal.tsx b/projects/app/src/pages/app/list/components/CreateModal.tsx index ee22875f8..ce81398a0 100644 --- a/projects/app/src/pages/app/list/components/CreateModal.tsx +++ b/projects/app/src/pages/app/list/components/CreateModal.tsx @@ -24,6 +24,7 @@ import { getTemplateMarketItemDetail, getTemplateMarketItemList } from '@/web/core/app/api/template'; +import { useSystemStore } from '@/web/common/system/useSystemStore'; type FormType = { avatar: string; @@ -46,6 +47,7 @@ const CreateModal = ({ const router = useRouter(); const { parentId, loadMyApps } = useContextSelector(AppListContext, (v) => v); const { isPc } = useSystem(); + const { feConfigs } = useSystemStore(); const typeMap = useRef({ [AppTypeEnum.simple]: { @@ -257,7 +259,7 @@ const CreateModal = ({ {t(item.intro as any)} - By {item.author} + {`By ${item.author || feConfigs.systemTitle}`} - By {item.author} + {`by ${item.author || feConfigs.systemTitle}`}