Skip to content
1 min read · 66 words

Type Alias: TurnPipelineMiddlewareFn

ts
type TurnPipelineMiddlewareFn = (
  ctx: TurnContext,
  next: NextFn,
) => void | Promise<void>;

Middleware function signature for the input and output pipelines in a @nhtio/adk!TurnRunner.

Parameters

ParameterTypeDescription
ctxTurnContextThe mutable @nhtio/adk!TurnContext for the current turn.
nextNextFnCallback to advance to the next middleware in the chain.

Returns

void | Promise<void>