mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
perf: text
This commit is contained in:
@@ -17,7 +17,7 @@ const Navbar = () => {
|
||||
const navbarList = useMemo(
|
||||
() => [
|
||||
{
|
||||
label: '模型',
|
||||
label: 'AI助手',
|
||||
icon: 'model',
|
||||
link: `/model?modelId=${lastModelId}`,
|
||||
activeLink: ['/model']
|
||||
|
@@ -10,7 +10,7 @@ const NavbarPhone = () => {
|
||||
const navbarList = useMemo(
|
||||
() => [
|
||||
{
|
||||
label: '模型',
|
||||
label: 'AI助手',
|
||||
icon: 'tabbarModel',
|
||||
link: `/model`,
|
||||
activeLink: ['/model']
|
||||
|
@@ -29,6 +29,6 @@ export enum PromotionEnum {
|
||||
|
||||
export const PromotionTypeMap = {
|
||||
[PromotionEnum.invite]: '好友充值',
|
||||
[PromotionEnum.shareModel]: '模型分享',
|
||||
[PromotionEnum.shareModel]: 'AI助手分享',
|
||||
[PromotionEnum.withdraw]: '提现'
|
||||
};
|
||||
|
@@ -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 个助手');
|
||||
}
|
||||
|
||||
// 创建模型
|
||||
|
@@ -44,7 +44,7 @@ const ModelList = ({ models, modelId }: { models: ModelListItemType[]; modelId:
|
||||
{item.name}
|
||||
</Box>
|
||||
<Box className="textEllipsis" color={'myGray.400'} fontSize={'sm'}>
|
||||
{item.systemPrompt || '这个模型没有提示词~'}
|
||||
{item.systemPrompt || '这个AI助手没有设置提示词~'}
|
||||
</Box>
|
||||
</Box>
|
||||
</Flex>
|
||||
|
@@ -640,7 +640,7 @@ const Chat = ({
|
||||
<MenuList fontSize={'sm'}>
|
||||
{chatData.model.canUse && (
|
||||
<MenuItem onClick={() => router.push(`/model?modelId=${chatData.modelId}`)}>
|
||||
模型详情
|
||||
AI助手详情
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem onClick={() => onclickCopy(item.value)}>复制</MenuItem>
|
||||
|
@@ -67,7 +67,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
|
||||
});
|
||||
// aut register a model
|
||||
postCreateModel({
|
||||
name: '模型1'
|
||||
name: 'AI助手1'
|
||||
});
|
||||
} catch (error: any) {
|
||||
toast({
|
||||
|
@@ -146,7 +146,7 @@ const ModelList = ({ modelId }: { modelId: string }) => {
|
||||
{item.name}
|
||||
</Box>
|
||||
<Box className="textEllipsis" color={'myGray.400'} fontSize={'sm'}>
|
||||
{item.systemPrompt || '这个模型没有提示词~'}
|
||||
{item.systemPrompt || '这个AI助手没有设置提示词~'}
|
||||
</Box>
|
||||
</Box>
|
||||
</Flex>
|
||||
|
@@ -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 = ({
|
||||
</Flex>
|
||||
{isOwner && (
|
||||
<Flex mt={5} alignItems={'center'}>
|
||||
<Box flex={'0 0 150px'}>删除模型和知识库</Box>
|
||||
<Box flex={'0 0 150px'}>删除AI和知识库</Box>
|
||||
<Button
|
||||
colorScheme={'gray'}
|
||||
variant={'outline'}
|
||||
size={'sm'}
|
||||
onClick={openConfirm(handleDelModel)}
|
||||
>
|
||||
删除模型
|
||||
删除AI助手
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
|
@@ -182,7 +182,7 @@ const SelectFileModal = ({
|
||||
fontSize={'sm'}
|
||||
>
|
||||
<Box mt={2} px={5} maxW={['100%', '70%']} textAlign={'justify'} color={'blackAlpha.600'}>
|
||||
支持 {fileExtension} 文件。模型会自动对文本进行 QA 拆分,需要较长训练时间,拆分需要消耗
|
||||
支持 {fileExtension} 文件。Gpt会自动对文本进行 QA 拆分,需要较长训练时间,拆分需要消耗
|
||||
tokens,账号余额不足时,未拆分的数据会被删除。一个{fileTextArr.length}个文本。
|
||||
</Box>
|
||||
{/* 拆分模式 */}
|
||||
|
@@ -99,7 +99,7 @@ const SelectUrlModal = ({
|
||||
fontSize={'sm'}
|
||||
>
|
||||
<Box mt={2} maxW={['100%', '70%']}>
|
||||
根据网站地址,获取网站文本内容(请注意仅能获取静态网站文本,注意看下获取后的内容是否正确)。模型会对文本进行
|
||||
根据网站地址,获取网站文本内容(请注意仅能获取静态网站文本,注意看下获取后的内容是否正确)。Gpt会对文本进行
|
||||
QA 拆分,需要较长训练时间,拆分需要消耗 tokens,账号余额不足时,未拆分的数据会被删除。
|
||||
</Box>
|
||||
<Flex w={'100%'} alignItems={'center'} my={4}>
|
||||
|
@@ -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('');
|
||||
|
@@ -38,7 +38,7 @@ const ShareModelList = ({
|
||||
</Box>
|
||||
</Flex>
|
||||
<Box flex={1} className={styles.intro} my={4} fontSize={'sm'} color={'blackAlpha.600'}>
|
||||
{model.share.intro || '这个模型没有介绍~'}
|
||||
{model.share.intro || '这个AI助手还没有介绍~'}
|
||||
</Box>
|
||||
<Flex justifyContent={'space-between'}>
|
||||
<Flex
|
||||
|
@@ -55,12 +55,12 @@ const modelList = () => {
|
||||
<Card px={6} py={3}>
|
||||
<Flex alignItems={'center'} justifyContent={'space-between'}>
|
||||
<Box fontWeight={'bold'} fontSize={'xl'}>
|
||||
我收藏的模型
|
||||
我收藏的AI助手
|
||||
</Box>
|
||||
</Flex>
|
||||
{collectionModels.length == 0 && (
|
||||
<Box textAlign={'center'} pt={3}>
|
||||
还没有收藏模型~
|
||||
还没有收藏AI助手~
|
||||
</Box>
|
||||
)}
|
||||
<Grid templateColumns={['1fr', '1fr 1fr', '1fr 1fr 1fr']} gridGap={4} mt={4}>
|
||||
@@ -71,7 +71,7 @@ const modelList = () => {
|
||||
<Card mt={5} px={6} py={3}>
|
||||
<Box display={['block', 'flex']} alignItems={'center'} justifyContent={'space-between'}>
|
||||
<Box fontWeight={'bold'} flex={1} fontSize={'xl'}>
|
||||
模型共享市场{' '}
|
||||
AI助手市场
|
||||
<Box as={'span'} fontWeight={'normal'} fontSize={'md'}>
|
||||
(Beta)
|
||||
</Box>
|
||||
@@ -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;
|
||||
|
@@ -7,7 +7,7 @@ import { useRouter } from 'next/router';
|
||||
const list = [
|
||||
{
|
||||
icon: 'shareMarket',
|
||||
label: '模型共享市场',
|
||||
label: 'AI助手市场',
|
||||
link: '/model/share'
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user