mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
fix: system plugin run time error (#1754)
This commit is contained in:
@@ -7,6 +7,7 @@ import type { PluginRuntimeType, PluginTemplateType } from '@fastgpt/global/core
|
||||
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { getHandleConfig } from '../../../global/core/workflow/template/utils';
|
||||
import { getNanoid } from '@fastgpt/global/common/string/tools';
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
/*
|
||||
plugin id rule:
|
||||
@@ -36,7 +37,7 @@ const getPluginTemplateById = async (id: string): Promise<PluginTemplateType> =>
|
||||
const item = global.communityPlugins?.find((plugin) => plugin.id === pluginId);
|
||||
if (!item) return Promise.reject('plugin not found');
|
||||
|
||||
return item;
|
||||
return cloneDeep(item);
|
||||
}
|
||||
if (source === PluginSourceEnum.personal) {
|
||||
const item = await MongoPlugin.findById(id).lean();
|
||||
|
@@ -270,8 +270,6 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
|
||||
nodes: runtimeNodes,
|
||||
variables
|
||||
});
|
||||
// console.log(JSON.stringify(input, null, 2), '=====================');
|
||||
|
||||
// format valueType
|
||||
params[input.key] = valueTypeFormat(value, input.valueType);
|
||||
});
|
||||
|
@@ -50,7 +50,6 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
|
||||
variables,
|
||||
node: { outputs },
|
||||
histories,
|
||||
isToolCall,
|
||||
params: {
|
||||
system_httpMethod: httpMethod = 'POST',
|
||||
system_httpReqUrl: httpReqUrl,
|
||||
|
Reference in New Issue
Block a user