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

Method _callNext

packages/components/src/agents.ts:240–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

238 }
239
240 async _callNext(): Promise<Record<string, unknown>> {
241 // final output already reached: stopiteration (final output)
242 if (this.finalOutputs) {
243 throw new Error(`Final outputs already reached: ${JSON.stringify(this.finalOutputs, null, 2)}`)
244 }
245 // timeout/max iterations: stopiteration (stopped response)
246 if (!this.agentExecutor.shouldContinueGetter(this.iterations)) {
247 return this._stop()
248 }
249 const nextStepOutput = await this._executeNextStep(this.runManager)
250 const output = await this._processNextStepOutput(nextStepOutput, this.runManager)
251 this.updateIterations()
252 return output
253 }
254}
255
256export class AgentExecutor extends BaseChain<ChainValues, AgentExecutorOutput> {

Callers 1

streamIteratorMethod · 0.95

Calls 6

_stopMethod · 0.95
_executeNextStepMethod · 0.95
updateIterationsMethod · 0.95
stringifyMethod · 0.80
shouldContinueGetterMethod · 0.80

Tested by

no test coverage detected