MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / _return

Method _return

packages/components/src/agents.ts:667–680  ·  view source on GitHub ↗
(
        output: AgentFinish,
        intermediateSteps: AgentStep[],
        runManager?: CallbackManagerForChainRun
    )

Source from the content-addressed store, hash-verified

665 }
666
667 async _return(
668 output: AgentFinish,
669 intermediateSteps: AgentStep[],
670 runManager?: CallbackManagerForChainRun
671 ): Promise<AgentExecutorOutput> {
672 if (runManager) {
673 await runManager.handleAgentEnd(output)
674 }
675 const finalOutput: Record<string, unknown> = output.returnValues
676 if (this.returnIntermediateSteps) {
677 finalOutput.intermediateSteps = intermediateSteps
678 }
679 return finalOutput
680 }
681
682 async _getToolReturn(nextStepOutput: AgentStep): Promise<AgentFinish | null> {
683 const { action, observation } = nextStepOutput

Callers 2

_stopMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected