Skip to content

Commit

Permalink
system title (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu authored Nov 29, 2023
1 parent abc1e57 commit 007fce2
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export const ClassifyQuestionModule: FlowModuleTemplateType = {
label: '背景知识',
description:
'你可以添加一些特定内容的介绍,从而更好的识别用户的问题类型。这个内容通常是给模型介绍一个它不知道的内容。',
placeholder: '例如: \n1. Laf 是一个云函数开发平台……\n2. Sealos 是一个集群操作系统',
placeholder:
'例如: \n1. AIGC(人工智能生成内容)是指使用人工智能技术自动或半自动地生成数字内容,如文本、图像、音乐、视频等。\n2. AIGC技术包括但不限于自然语言处理、计算机视觉、机器学习和深度学习。这些技术可以创建新内容或修改现有内容,以满足特定的创意、教育、娱乐或信息需求。',
showTargetInApp: true,
showTargetInPlugin: true
},
Expand Down
2 changes: 2 additions & 0 deletions projects/app/src/components/ChatBox/MessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ const MessageInput = ({
);
} catch (error) {
setFileList((state) => state.filter((item) => item.id !== file.id));
console.log(error);

toast({
status: 'error',
title: t('common.Upload File Failed')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const MyRadio = ({
}
: {
_hover: {
bg: 'white'
bg: 'myBlue.100',
borderColor: 'myBlue.600'
}
})}
_after={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { reRankModelList } from '@/web/common/system/staticData';

import { ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
import { DatasetSearchModeMap } from '@fastgpt/global/core/dataset/constant';
import MyRadio from '@/components/Radio';
import MyRadio from '@/components/common/MyRadio';

type DatasetParamsProps = {
similarity?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ const VariableEdit = ({
fontWeight: 'bold'
}
: {
color: 'myGray.600',
_hover: {
boxShadow: 'md'
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MyRadio from '@/components/Radio';
import MyRadio from '@/components/common/MyRadio';
import { PermissionTypeEnum } from '@fastgpt/global/support/permission/constant';
import { useTranslation } from 'next-i18next';

Expand Down
10 changes: 5 additions & 5 deletions projects/app/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import type { AppProps } from 'next/app';
import Script from 'next/script';
import Head from 'next/head';
Expand Down Expand Up @@ -39,16 +39,18 @@ function App({ Component, pageProps }: AppProps) {
const router = useRouter();
const { hiId } = router.query as { hiId?: string };
const { i18n } = useTranslation();
const { setLastRoute } = useSystemStore();
const [scripts, setScripts] = useState<FeConfigsType['scripts']>([]);
const [title, setTitle] = useState(process.env.SYSTEM_NAME || 'AI');

useEffect(() => {
// get init data
(async () => {
const {
feConfigs: { scripts, isPlus }
feConfigs: { scripts, isPlus, systemTitle }
} = await clientInitData();

setTitle(systemTitle || 'FastGPT');

// log fastgpt
!isPlus &&
console.log(
Expand Down Expand Up @@ -90,8 +92,6 @@ function App({ Component, pageProps }: AppProps) {
hiId && localStorage.setItem('inviterId', hiId);
}, [hiId]);

const title = feConfigs?.systemTitle || process.env.SYSTEM_NAME || '';

return (
<>
<Head>
Expand Down
8 changes: 8 additions & 0 deletions projects/app/src/pages/api/common/file/uploadImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
});
}
}

export const config = {
api: {
bodyParser: {
sizeLimit: '16mb'
}
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Box, useTheme } from '@chakra-ui/react';
import { OutLinkTypeEnum } from '@fastgpt/global/support/outLink/constant';
import dynamic from 'next/dynamic';

import MyRadio from '@/components/Radio';
import MyRadio from '@/components/common/MyRadio';
import Share from './Share';
const API = dynamic(() => import('./API'));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo, useState } from 'react';
import { Box, type BoxProps, Flex, useTheme, ModalCloseButton } from '@chakra-ui/react';
import MyRadio from '@/components/Radio/index';
import MyRadio from '@/components/common/MyRadio/index';
import dynamic from 'next/dynamic';
import ChunkImport from './Chunk';
import { useTranslation } from 'next-i18next';
Expand Down

0 comments on commit 007fce2

Please sign in to comment.