mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
default config
This commit is contained in:
@@ -1,18 +1,15 @@
|
|||||||
{
|
{
|
||||||
"FeConfig": {
|
"FeConfig": {
|
||||||
"show_emptyChat": true,
|
"show_emptyChat": true,
|
||||||
"show_register": true,
|
"show_register": false,
|
||||||
"show_appStore": false,
|
"show_appStore": false,
|
||||||
"show_userDetail": true,
|
"show_userDetail": false,
|
||||||
"show_git": true,
|
"show_git": true,
|
||||||
"systemTitle": "FastAI",
|
"systemTitle": "FastAI",
|
||||||
"authorText": "Made by FastAI Team."
|
"authorText": "Made by FastAI Team."
|
||||||
},
|
},
|
||||||
"SystemParams": {
|
"SystemParams": {
|
||||||
"beianText": "",
|
"beianText": "",
|
||||||
"baiduTongji": "",
|
|
||||||
"googleClientVerKey": "",
|
|
||||||
"googleServiceVerKey": "",
|
|
||||||
"vectorMaxProcess": 15,
|
"vectorMaxProcess": 15,
|
||||||
"qaMaxProcess": 15,
|
"qaMaxProcess": 15,
|
||||||
"pgIvfflatProbe": 20,
|
"pgIvfflatProbe": 20,
|
||||||
|
@@ -39,9 +39,9 @@ const defaultSystemEnv = {
|
|||||||
};
|
};
|
||||||
const defaultFeConfigs = {
|
const defaultFeConfigs = {
|
||||||
show_emptyChat: true,
|
show_emptyChat: true,
|
||||||
show_register: true,
|
show_register: false,
|
||||||
show_appStore: false,
|
show_appStore: false,
|
||||||
show_userDetail: true,
|
show_userDetail: false,
|
||||||
show_git: true,
|
show_git: true,
|
||||||
systemTitle: 'FastAI',
|
systemTitle: 'FastAI',
|
||||||
authorText: 'Made by FastAI Team.'
|
authorText: 'Made by FastAI Team.'
|
||||||
@@ -90,8 +90,9 @@ const defaultVectorModels = [
|
|||||||
|
|
||||||
export async function getInitConfig() {
|
export async function getInitConfig() {
|
||||||
try {
|
try {
|
||||||
const filename = process.env.NODE_ENV === 'development' ? 'config.json.local' : 'config.json';
|
const filename =
|
||||||
const res = JSON.parse(readFileSync(`data/${filename}`, 'utf-8'));
|
process.env.NODE_ENV === 'development' ? 'data/config.json.local' : '/app/data/config.json';
|
||||||
|
const res = JSON.parse(readFileSync(filename, 'utf-8'));
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
global.systemEnv = res.SystemParams || defaultSystemEnv;
|
global.systemEnv = res.SystemParams || defaultSystemEnv;
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
|
||||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||||
import { jsonRes } from '@/service/response';
|
import { jsonRes } from '@/service/response';
|
||||||
import { AuthCode } from '@/service/models/authCode';
|
import { AuthCode } from '@/service/models/authCode';
|
||||||
|
@@ -23,7 +23,7 @@ const SliderApps = ({ appId }: { appId: string }) => {
|
|||||||
px={3}
|
px={3}
|
||||||
borderRadius={'md'}
|
borderRadius={'md'}
|
||||||
_hover={{ bg: 'myGray.200' }}
|
_hover={{ bg: 'myGray.200' }}
|
||||||
onClick={() => router.back()}
|
onClick={() => router.push('/app/list')}
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
mr={3}
|
mr={3}
|
||||||
|
@@ -87,16 +87,16 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
|
|||||||
{!!errors.password && errors.password.message}
|
{!!errors.password && errors.password.message}
|
||||||
</FormErrorMessage>
|
</FormErrorMessage>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<Flex align={'center'} justifyContent={'space-between'} mt={6} color={'myBlue.600'}>
|
{feConfigs?.show_register && (
|
||||||
<Box
|
<Flex align={'center'} justifyContent={'space-between'} mt={6} color={'myBlue.600'}>
|
||||||
cursor={'pointer'}
|
<Box
|
||||||
_hover={{ textDecoration: 'underline' }}
|
cursor={'pointer'}
|
||||||
onClick={() => setPageType('forgetPassword')}
|
_hover={{ textDecoration: 'underline' }}
|
||||||
fontSize="sm"
|
onClick={() => setPageType('forgetPassword')}
|
||||||
>
|
fontSize="sm"
|
||||||
忘记密码?
|
>
|
||||||
</Box>
|
忘记密码?
|
||||||
{feConfigs?.show_register && (
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
cursor={'pointer'}
|
cursor={'pointer'}
|
||||||
_hover={{ textDecoration: 'underline' }}
|
_hover={{ textDecoration: 'underline' }}
|
||||||
@@ -105,8 +105,8 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
|
|||||||
>
|
>
|
||||||
注册账号
|
注册账号
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
</Flex>
|
||||||
</Flex>
|
)}
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
mt={8}
|
mt={8}
|
||||||
|
Reference in New Issue
Block a user