perf: text

This commit is contained in:
archer
2023-05-08 09:40:27 +08:00
parent 014fb504a4
commit b0402434e2
15 changed files with 20 additions and 20 deletions

View File

@@ -17,7 +17,7 @@ const Navbar = () => {
const navbarList = useMemo(
() => [
{
label: '模型',
label: 'AI助手',
icon: 'model',
link: `/model?modelId=${lastModelId}`,
activeLink: ['/model']

View File

@@ -10,7 +10,7 @@ const NavbarPhone = () => {
const navbarList = useMemo(
() => [
{
label: '模型',
label: 'AI助手',
icon: 'tabbarModel',
link: `/model`,
activeLink: ['/model']

View File

@@ -29,6 +29,6 @@ export enum PromotionEnum {
export const PromotionTypeMap = {
[PromotionEnum.invite]: '好友充值',
[PromotionEnum.shareModel]: '模型分享',
[PromotionEnum.shareModel]: 'AI助手分享',
[PromotionEnum.withdraw]: '提现'
};

View File

@@ -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 个助手');
}
// 创建模型

View File

@@ -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>

View File

@@ -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>

View File

@@ -67,7 +67,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
});
// aut register a model
postCreateModel({
name: '模型1'
name: 'AI助手1'
});
} catch (error: any) {
toast({

View File

@@ -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>

View File

@@ -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>
)}

View File

@@ -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>
{/* 拆分模式 */}

View File

@@ -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}>

View File

@@ -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('');

View File

@@ -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

View File

@@ -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;

View File

@@ -7,7 +7,7 @@ import { useRouter } from 'next/router';
const list = [
{
icon: 'shareMarket',
label: '模型共享市场',
label: 'AI助手市场',
link: '/model/share'
},
{