Workflow deep and workflow connection performance (#2664)
* feat: Workflow dispatch deep * perf: workflow connection
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
import { StoreNodeItemType } from '@fastgpt/global/core/workflow/type/node';
|
||||
import { getWorkflowResponseWrite } from '@fastgpt/service/core/workflow/dispatch/utils';
|
||||
import { getNanoid } from '@fastgpt/global/common/string/tools';
|
||||
import { WORKFLOW_MAX_RUN_TIMES } from '@fastgpt/service/core/workflow/constants';
|
||||
|
||||
export type Props = {
|
||||
messages: ChatCompletionMessageParam[];
|
||||
@@ -120,7 +121,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
chatConfig,
|
||||
histories: chatMessages,
|
||||
stream: true,
|
||||
maxRunTimes: 200,
|
||||
maxRunTimes: WORKFLOW_MAX_RUN_TIMES,
|
||||
workflowStreamResponse: workflowResponseWrite
|
||||
});
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import { PostWorkflowDebugProps, PostWorkflowDebugResponse } from '@/global/core
|
||||
import { NextAPI } from '@/service/middleware/entry';
|
||||
import { ReadPermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||
import { defaultApp } from '@/web/core/app/constants';
|
||||
import { WORKFLOW_MAX_RUN_TIMES } from '@fastgpt/service/core/workflow/constants';
|
||||
|
||||
async function handler(
|
||||
req: NextApiRequest,
|
||||
@@ -57,7 +58,7 @@ async function handler(
|
||||
chatConfig: defaultApp.chatConfig,
|
||||
histories: [],
|
||||
stream: false,
|
||||
maxRunTimes: 200
|
||||
maxRunTimes: WORKFLOW_MAX_RUN_TIMES
|
||||
});
|
||||
|
||||
pushChatUsage({
|
||||
|
||||
Reference in New Issue
Block a user