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:
Archer
2024-07-19 14:15:01 +08:00
committed by GitHub
parent 1eedb9caba
commit cf7145ab54
165 changed files with 2643 additions and 557 deletions

View File

@@ -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交流群: ![](https://oss.laf.run/htr4n1-images/fastgpt-qr-code.jpg)',

View File

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