Commit 88633a2a by Archer Committed by GitHub

fix: child usage remove (#5698)

* fix: child usage remove

* remove runloop empty usage
parent 05145523
...@@ -61,6 +61,7 @@ export const dispatchAppRequest = async (props: Props): Promise<Response> => { ...@@ -61,6 +61,7 @@ export const dispatchAppRequest = async (props: Props): Promise<Response> => {
const { flowResponses, flowUsages, assistantResponses, system_memories } = await runWorkflow({ const { flowResponses, flowUsages, assistantResponses, system_memories } = await runWorkflow({
...props, ...props,
usageId: undefined,
runningAppInfo: { runningAppInfo: {
id: String(appData._id), id: String(appData._id),
name: appData.name, name: appData.name,
......
...@@ -112,6 +112,7 @@ export const runToolCall = async ( ...@@ -112,6 +112,7 @@ export const runToolCall = async (
// Run entry tool // Run entry tool
const toolRunResponse = await runWorkflow({ const toolRunResponse = await runWorkflow({
...workflowProps, ...workflowProps,
usageId: undefined,
isToolCall: true isToolCall: true
}); });
const stringToolResponse = formatToolResponse(toolRunResponse.toolResponses); const stringToolResponse = formatToolResponse(toolRunResponse.toolResponses);
......
...@@ -134,6 +134,7 @@ export const dispatchRunAppNode = async (props: Props): Promise<Response> => { ...@@ -134,6 +134,7 @@ export const dispatchRunAppNode = async (props: Props): Promise<Response> => {
system_memories system_memories
} = await runWorkflow({ } = await runWorkflow({
...props, ...props,
usageId: undefined,
lastInteractive: childrenInteractive, lastInteractive: childrenInteractive,
// Rewrite stream mode // Rewrite stream mode
...(system_forbid_stream ...(system_forbid_stream
......
...@@ -95,6 +95,7 @@ export const dispatchLoop = async (props: Props): Promise<Response> => { ...@@ -95,6 +95,7 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
const response = await runWorkflow({ const response = await runWorkflow({
...props, ...props,
usageId: undefined,
lastInteractive: interactiveData?.childrenResponse, lastInteractive: interactiveData?.childrenResponse,
variables: newVariables, variables: newVariables,
runtimeNodes, runtimeNodes,
...@@ -150,12 +151,14 @@ export const dispatchLoop = async (props: Props): Promise<Response> => { ...@@ -150,12 +151,14 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
loopDetail: loopResponseDetail, loopDetail: loopResponseDetail,
mergeSignId: props.node.nodeId mergeSignId: props.node.nodeId
}, },
[DispatchNodeResponseKeyEnum.nodeDispatchUsages]: [ [DispatchNodeResponseKeyEnum.nodeDispatchUsages]: totalPoints
? [
{ {
totalPoints, totalPoints,
moduleName: name moduleName: name
} }
], ]
: [],
[DispatchNodeResponseKeyEnum.newVariables]: newVariables [DispatchNodeResponseKeyEnum.newVariables]: newVariables
}; };
}; };
...@@ -120,6 +120,7 @@ export const dispatchRunPlugin = async (props: RunPluginProps): Promise<RunPlugi ...@@ -120,6 +120,7 @@ export const dispatchRunPlugin = async (props: RunPluginProps): Promise<RunPlugi
const { flowResponses, flowUsages, assistantResponses, runTimes, system_memories } = const { flowResponses, flowUsages, assistantResponses, runTimes, system_memories } =
await runWorkflow({ await runWorkflow({
...props, ...props,
usageId: undefined,
// Rewrite stream mode // Rewrite stream mode
...(system_forbid_stream ...(system_forbid_stream
? { ? {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment