mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
perf: doc2x plugins (#3162)
This commit is contained in:
@@ -215,6 +215,7 @@ const FieldEditModal = ({
|
||||
);
|
||||
const onSubmitError = useCallback(
|
||||
(e: Object) => {
|
||||
console.log('e', e);
|
||||
for (const item of Object.values(e)) {
|
||||
if (item.message) {
|
||||
toast({
|
||||
|
@@ -511,22 +511,14 @@ const InputTypeConfig = ({
|
||||
<FormLabel flex={'0 0 132px'} fontWeight={'medium'}>
|
||||
{t('app:document_upload')}
|
||||
</FormLabel>
|
||||
<Switch
|
||||
{...register('canSelectFile', {
|
||||
required: true
|
||||
})}
|
||||
/>
|
||||
<Switch {...register('canSelectFile')} />
|
||||
</Flex>
|
||||
<Box w={'full'} minH={'40px'}>
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel flex={'0 0 132px'} fontWeight={'medium'}>
|
||||
{t('app:image_upload')}
|
||||
</FormLabel>
|
||||
<Switch
|
||||
{...register('canSelectImg', {
|
||||
required: true
|
||||
})}
|
||||
/>
|
||||
<Switch {...register('canSelectImg')} />
|
||||
</Flex>
|
||||
<Flex color={'myGray.500'}>
|
||||
<Box fontSize={'xs'}>{t('app:image_upload_tip')}</Box>
|
||||
|
@@ -115,6 +115,16 @@ const NodeCard = (props: Props) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
onSuccess(res) {
|
||||
if (!res) return;
|
||||
// Execute forcibly updates the courseUrl field
|
||||
onChangeNode({
|
||||
nodeId,
|
||||
type: 'attr',
|
||||
key: 'courseUrl',
|
||||
value: res?.courseUrl
|
||||
});
|
||||
},
|
||||
manual: false
|
||||
}
|
||||
);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { getSystemPlugins } from '@/service/core/app/plugin';
|
||||
import { getSystemPluginCb, getSystemPlugins } from '@/service/core/app/plugin';
|
||||
import { initSystemConfig } from '.';
|
||||
import { createDatasetTrainingMongoWatch } from '@/service/core/dataset/training/utils';
|
||||
import { MongoSystemConfigs } from '@fastgpt/service/common/system/config/schema';
|
||||
|
@@ -22,6 +22,8 @@ export const getSystemPlugins = async (refresh = false) => {
|
||||
|
||||
addLog.info(`Load system plugin successfully: ${global.systemPlugins.length}`);
|
||||
|
||||
getSystemPluginCb();
|
||||
|
||||
return cloneDeep(global.systemPlugins);
|
||||
} catch (error) {
|
||||
//@ts-ignore
|
||||
|
@@ -12,7 +12,7 @@ import { startMongoWatch } from './common/system/volumnMongoWatch';
|
||||
import { startTrainingQueue } from './core/dataset/training/utils';
|
||||
import { systemStartCb } from '@fastgpt/service/common/system/tools';
|
||||
import { addLog } from '@fastgpt/service/common/system/log';
|
||||
import { getSystemPluginCb } from './core/app/plugin';
|
||||
import { getSystemPlugins } from './core/app/plugin';
|
||||
|
||||
/**
|
||||
* This function is equivalent to the entry to the service
|
||||
@@ -32,8 +32,9 @@ export function connectToDatabase() {
|
||||
systemStartCb();
|
||||
|
||||
//init system config;init vector database;init root user
|
||||
await Promise.all([getInitConfig(), getSystemPluginCb(), initVectorStore(), initRootUser()]);
|
||||
await Promise.all([getInitConfig(), initVectorStore(), initRootUser()]);
|
||||
|
||||
getSystemPlugins();
|
||||
startMongoWatch();
|
||||
// cron
|
||||
startCron();
|
||||
|
Reference in New Issue
Block a user