From b0402434e28adc9c654d5251d5bd3d90dc2fd7b6 Mon Sep 17 00:00:00 2001 From: archer <545436317@qq.com> Date: Mon, 8 May 2023 09:40:27 +0800 Subject: [PATCH] perf: text --- src/components/Layout/navbar.tsx | 2 +- src/components/Layout/navbarPhone.tsx | 2 +- src/constants/user.ts | 2 +- src/pages/api/model/create.ts | 2 +- src/pages/chat/components/ModelList.tsx | 2 +- src/pages/chat/index.tsx | 2 +- src/pages/login/components/RegisterForm.tsx | 2 +- src/pages/model/components/ModelList.tsx | 2 +- .../model/components/detail/components/ModelEditForm.tsx | 6 +++--- .../components/detail/components/SelectFileModal.tsx | 2 +- .../model/components/detail/components/SelectUrlModal.tsx | 2 +- src/pages/model/components/detail/index.tsx | 2 +- src/pages/model/share/components/list.tsx | 2 +- src/pages/model/share/index.tsx | 8 ++++---- src/pages/tools/index.tsx | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/Layout/navbar.tsx b/src/components/Layout/navbar.tsx index b6d0e5da3..7a86ff1c1 100644 --- a/src/components/Layout/navbar.tsx +++ b/src/components/Layout/navbar.tsx @@ -17,7 +17,7 @@ const Navbar = () => { const navbarList = useMemo( () => [ { - label: '模型', + label: 'AI助手', icon: 'model', link: `/model?modelId=${lastModelId}`, activeLink: ['/model'] diff --git a/src/components/Layout/navbarPhone.tsx b/src/components/Layout/navbarPhone.tsx index 7cccb3571..028eac59c 100644 --- a/src/components/Layout/navbarPhone.tsx +++ b/src/components/Layout/navbarPhone.tsx @@ -10,7 +10,7 @@ const NavbarPhone = () => { const navbarList = useMemo( () => [ { - label: '模型', + label: 'AI助手', icon: 'tabbarModel', link: `/model`, activeLink: ['/model'] diff --git a/src/constants/user.ts b/src/constants/user.ts index bd204bd59..67660938f 100644 --- a/src/constants/user.ts +++ b/src/constants/user.ts @@ -29,6 +29,6 @@ export enum PromotionEnum { export const PromotionTypeMap = { [PromotionEnum.invite]: '好友充值', - [PromotionEnum.shareModel]: '模型分享', + [PromotionEnum.shareModel]: 'AI助手分享', [PromotionEnum.withdraw]: '提现' }; diff --git a/src/pages/api/model/create.ts b/src/pages/api/model/create.ts index da7aaff6c..fbe6f170b 100644 --- a/src/pages/api/model/create.ts +++ b/src/pages/api/model/create.ts @@ -26,7 +26,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse< userId }); if (authCount >= 30) { - throw new Error('上限 30 个模型'); + throw new Error('上限 30 个助手'); } // 创建模型 diff --git a/src/pages/chat/components/ModelList.tsx b/src/pages/chat/components/ModelList.tsx index 12386d25f..7e6a7cb55 100644 --- a/src/pages/chat/components/ModelList.tsx +++ b/src/pages/chat/components/ModelList.tsx @@ -44,7 +44,7 @@ const ModelList = ({ models, modelId }: { models: ModelListItemType[]; modelId: {item.name} - {item.systemPrompt || '这个模型没有提示词~'} + {item.systemPrompt || '这个AI助手没有设置提示词~'} diff --git a/src/pages/chat/index.tsx b/src/pages/chat/index.tsx index 1be11422b..6790116d8 100644 --- a/src/pages/chat/index.tsx +++ b/src/pages/chat/index.tsx @@ -640,7 +640,7 @@ const Chat = ({ {chatData.model.canUse && ( router.push(`/model?modelId=${chatData.modelId}`)}> - 模型详情 + AI助手详情 )} onclickCopy(item.value)}>复制 diff --git a/src/pages/login/components/RegisterForm.tsx b/src/pages/login/components/RegisterForm.tsx index b81751379..542975754 100644 --- a/src/pages/login/components/RegisterForm.tsx +++ b/src/pages/login/components/RegisterForm.tsx @@ -67,7 +67,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => { }); // aut register a model postCreateModel({ - name: '模型1' + name: 'AI助手1' }); } catch (error: any) { toast({ diff --git a/src/pages/model/components/ModelList.tsx b/src/pages/model/components/ModelList.tsx index 80e9deb08..7ba514ff5 100644 --- a/src/pages/model/components/ModelList.tsx +++ b/src/pages/model/components/ModelList.tsx @@ -146,7 +146,7 @@ const ModelList = ({ modelId }: { modelId: string }) => { {item.name} - {item.systemPrompt || '这个模型没有提示词~'} + {item.systemPrompt || '这个AI助手没有设置提示词~'} diff --git a/src/pages/model/components/detail/components/ModelEditForm.tsx b/src/pages/model/components/detail/components/ModelEditForm.tsx index e9a55f59e..46924482f 100644 --- a/src/pages/model/components/detail/components/ModelEditForm.tsx +++ b/src/pages/model/components/detail/components/ModelEditForm.tsx @@ -38,7 +38,7 @@ const ModelEditForm = ({ handleDelModel: () => void; }) => { const { openConfirm, ConfirmChild } = useConfirm({ - content: '确认删除该模型?' + content: '确认删除该AI助手?' }); const { register, setValue, getValues } = formHooks; const [refresh, setRefresh] = useState(false); @@ -145,14 +145,14 @@ const ModelEditForm = ({ {isOwner && ( - 删除模型和知识库 + 删除AI和知识库 )} diff --git a/src/pages/model/components/detail/components/SelectFileModal.tsx b/src/pages/model/components/detail/components/SelectFileModal.tsx index d50e7380d..8bd5acce3 100644 --- a/src/pages/model/components/detail/components/SelectFileModal.tsx +++ b/src/pages/model/components/detail/components/SelectFileModal.tsx @@ -182,7 +182,7 @@ const SelectFileModal = ({ fontSize={'sm'} > - 支持 {fileExtension} 文件。模型会自动对文本进行 QA 拆分,需要较长训练时间,拆分需要消耗 + 支持 {fileExtension} 文件。Gpt会自动对文本进行 QA 拆分,需要较长训练时间,拆分需要消耗 tokens,账号余额不足时,未拆分的数据会被删除。一个{fileTextArr.length}个文本。 {/* 拆分模式 */} diff --git a/src/pages/model/components/detail/components/SelectUrlModal.tsx b/src/pages/model/components/detail/components/SelectUrlModal.tsx index 53bf3348b..3b9e526c7 100644 --- a/src/pages/model/components/detail/components/SelectUrlModal.tsx +++ b/src/pages/model/components/detail/components/SelectUrlModal.tsx @@ -99,7 +99,7 @@ const SelectUrlModal = ({ fontSize={'sm'} > - 根据网站地址,获取网站文本内容(请注意仅能获取静态网站文本,注意看下获取后的内容是否正确)。模型会对文本进行 + 根据网站地址,获取网站文本内容(请注意仅能获取静态网站文本,注意看下获取后的内容是否正确)。Gpt会对文本进行 QA 拆分,需要较长训练时间,拆分需要消耗 tokens,账号余额不足时,未拆分的数据会被删除。 diff --git a/src/pages/model/components/detail/index.tsx b/src/pages/model/components/detail/index.tsx index 0334797d0..ddc6e7088 100644 --- a/src/pages/model/components/detail/index.tsx +++ b/src/pages/model/components/detail/index.tsx @@ -31,7 +31,7 @@ const ModelDetail = ({ modelId, isPc }: { modelId: string; isPc: boolean }) => { }, onError(err: any) { toast({ - title: err?.message || '获取模型异常', + title: err?.message || '获取AI助手异常', status: 'error' }); setLastModelId(''); diff --git a/src/pages/model/share/components/list.tsx b/src/pages/model/share/components/list.tsx index 46624d951..fbb0cc1e3 100644 --- a/src/pages/model/share/components/list.tsx +++ b/src/pages/model/share/components/list.tsx @@ -38,7 +38,7 @@ const ShareModelList = ({ - {model.share.intro || '这个模型没有介绍~'} + {model.share.intro || '这个AI助手还没有介绍~'} { - 我收藏的模型 + 我收藏的AI助手 {collectionModels.length == 0 && ( - 还没有收藏模型~ + 还没有收藏AI助手~ )} @@ -71,7 +71,7 @@ const modelList = () => { - 模型共享市场{' '} + AI助手市场 (Beta) @@ -81,7 +81,7 @@ const modelList = () => { maxW={'240px'} size={'sm'} value={searchText} - placeholder="搜索模型,回车确认" + placeholder="搜索AI助手,回车确认" onChange={(e) => setSearchText(e.target.value)} onBlur={() => { if (searchText === lastSearch.current) return; diff --git a/src/pages/tools/index.tsx b/src/pages/tools/index.tsx index a921fb87d..c18c2ca60 100644 --- a/src/pages/tools/index.tsx +++ b/src/pages/tools/index.tsx @@ -7,7 +7,7 @@ import { useRouter } from 'next/router'; const list = [ { icon: 'shareMarket', - label: '模型共享市场', + label: 'AI助手市场', link: '/model/share' }, {