mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-31 03:22:18 +00:00
System plugin (#2091)
* System template (#2082) * feat: system plugin (#2024) * add plugin cost & change plugin avatar (#2030) * add plugin cost & change plugin avatar * add author * feat: duckduckgo plugin * duckduck search * perf: templates select system plugin * perf: system plugin avatar * feat: duckduck plugins * doc * perf: plugin classify * perf: icon avatar component * perf: system template avatar --------- Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com> * feat: system plugin search * perf: plugin packages important * perf: source avatar * nextconfig * perf: i18n * perf: default model * perf: system plugin author --------- Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -61,6 +61,7 @@ const defaultFeConfigs: FastGPTFeConfigsType = {
|
||||
show_git: true,
|
||||
docUrl: 'https://doc.fastgpt.in',
|
||||
openAPIDocUrl: 'https://doc.fastgpt.in/docs/development/openapi',
|
||||
systemPluginCourseUrl: 'https://fael3z0zfze.feishu.cn/wiki/ERZnw9R26iRRG0kXZRec6WL9nwh',
|
||||
systemTitle: 'FastGPT',
|
||||
concatMd:
|
||||
'项目开源地址: [FastGPT GitHub](https://github.com/labring/FastGPT)\n交流群: ',
|
||||
|
@@ -1,9 +1,12 @@
|
||||
import { initSystemConfig } from '.';
|
||||
import { createDatasetTrainingMongoWatch } from '@/service/core/dataset/training/utils';
|
||||
import { getSystemPluginTemplates } from '@fastgpt/plugins/register';
|
||||
import { MongoSystemConfigs } from '@fastgpt/service/common/system/config/schema';
|
||||
import { MongoSystemPluginSchema } from '@fastgpt/service/core/app/plugin/systemPluginSchema';
|
||||
|
||||
export const startMongoWatch = async () => {
|
||||
reloadConfigWatch();
|
||||
refetchSystemPlugin();
|
||||
createDatasetTrainingMongoWatch();
|
||||
};
|
||||
|
||||
@@ -19,3 +22,13 @@ const reloadConfigWatch = () => {
|
||||
} catch (error) {}
|
||||
});
|
||||
};
|
||||
|
||||
const refetchSystemPlugin = () => {
|
||||
const changeStream = MongoSystemPluginSchema.watch();
|
||||
|
||||
changeStream.on('change', async (change) => {
|
||||
try {
|
||||
getSystemPluginTemplates(true);
|
||||
} catch (error) {}
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user