Share via


TranscriptLoggerMiddleware class

Middleware for logging agent conversations to a transcript logger.

Constructors

TranscriptLoggerMiddleware(TranscriptLogger)

Creates a new instance of the TranscriptLoggerMiddleware class.

Methods

onTurn(TurnContext, () => Promise<void>)

Called each time the agent processes a turn.

Constructor Details

TranscriptLoggerMiddleware(TranscriptLogger)

Creates a new instance of the TranscriptLoggerMiddleware class.

new TranscriptLoggerMiddleware(logger: TranscriptLogger)

Parameters

logger
TranscriptLogger

The transcript logger to use.

Method Details

onTurn(TurnContext, () => Promise<void>)

Called each time the agent processes a turn.

function onTurn(context: TurnContext, next: () => Promise<void>): Promise<void>

Parameters

context
TurnContext

The context object for the turn.

next

() => Promise<void>

The next middleware or handler to call.

Returns

Promise<void>