feat: Add the workflowInteractiveResponse field in the debugging handler to enhance response capabilities
This commit is contained in:
@@ -52,33 +52,34 @@ async function handler(
|
|||||||
const { timezone, externalProvider } = await getUserChatInfoAndAuthTeamPoints(tmbId);
|
const { timezone, externalProvider } = await getUserChatInfoAndAuthTeamPoints(tmbId);
|
||||||
|
|
||||||
/* start process */
|
/* start process */
|
||||||
const { flowUsages, flowResponses, debugResponse, newVariables } = await dispatchWorkFlow({
|
const { flowUsages, flowResponses, debugResponse, newVariables, workflowInteractiveResponse } =
|
||||||
res,
|
await dispatchWorkFlow({
|
||||||
requestOrigin: req.headers.origin,
|
res,
|
||||||
mode: 'debug',
|
requestOrigin: req.headers.origin,
|
||||||
timezone,
|
mode: 'debug',
|
||||||
externalProvider,
|
timezone,
|
||||||
uid: tmbId,
|
externalProvider,
|
||||||
|
uid: tmbId,
|
||||||
|
|
||||||
runningAppInfo: {
|
runningAppInfo: {
|
||||||
id: app._id,
|
id: app._id,
|
||||||
teamId: app.teamId,
|
teamId: app.teamId,
|
||||||
tmbId: app.tmbId
|
tmbId: app.tmbId
|
||||||
},
|
},
|
||||||
runningUserInfo: {
|
runningUserInfo: {
|
||||||
teamId,
|
teamId,
|
||||||
tmbId
|
tmbId
|
||||||
},
|
},
|
||||||
|
|
||||||
runtimeNodes: nodes,
|
runtimeNodes: nodes,
|
||||||
runtimeEdges: edges,
|
runtimeEdges: edges,
|
||||||
variables,
|
variables,
|
||||||
query: query,
|
query: query,
|
||||||
chatConfig: defaultApp.chatConfig,
|
chatConfig: defaultApp.chatConfig,
|
||||||
histories: history,
|
histories: history,
|
||||||
stream: false,
|
stream: false,
|
||||||
maxRunTimes: WORKFLOW_MAX_RUN_TIMES
|
maxRunTimes: WORKFLOW_MAX_RUN_TIMES
|
||||||
});
|
});
|
||||||
|
|
||||||
createChatUsage({
|
createChatUsage({
|
||||||
appName: `${app.name}-Debug`,
|
appName: `${app.name}-Debug`,
|
||||||
@@ -92,7 +93,8 @@ async function handler(
|
|||||||
return {
|
return {
|
||||||
...debugResponse,
|
...debugResponse,
|
||||||
newVariables,
|
newVariables,
|
||||||
flowResponses
|
flowResponses,
|
||||||
|
workflowInteractiveResponse
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user