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

Method onFirstStep

packages/components/src/agents.ts:161–184  ·  view source on GitHub ↗

* Perform any necessary setup for the first step * of the asynchronous iterator.

()

Source from the content-addressed store, hash-verified

159 * of the asynchronous iterator.
160 */
161 async onFirstStep(): Promise<void> {
162 if (this.iterations === 0) {
163 const callbackManager = await CallbackManager.configure(
164 this.callbacks,
165 this.agentExecutor.callbacks,
166 this.tags,
167 this.agentExecutor.tags,
168 this.metadata,
169 this.agentExecutor.metadata,
170 {
171 verbose: this.agentExecutor.verbose
172 }
173 )
174 this.runManager = await callbackManager?.handleChainStart(
175 this.agentExecutor.toJSON(),
176 this.inputs,
177 undefined,
178 undefined,
179 this.tags,
180 this.metadata,
181 this.runName
182 )
183 }
184 }
185
186 /**
187 * Execute the next step in the chain using the

Callers 1

streamIteratorMethod · 0.95

Calls 2

handleChainStartMethod · 0.80
toJSONMethod · 0.65

Tested by

no test coverage detected