DefaultModerator class

Default moderator created by the AI system if one isn't configured.

Remarks

The default moderator is a pass-through and always approves all inputs and outputs.

Methods

reviewInput(TurnContext, TState)

Allows all prompts by returning undefined.

reviewOutput(TurnContext, TState, Plan)

Allows all plans by returning the plan as-is.

Method Details

reviewInput(TurnContext, TState)

Allows all prompts by returning undefined.

function reviewInput(context: TurnContext, state: TState): Promise<undefined | Plan>

Parameters

context

TurnContext

The context object for the turn.

state

TState

The current turn state.

Returns

Promise<undefined | Plan>

A promise that resolves to undefined.

reviewOutput(TurnContext, TState, Plan)

Allows all plans by returning the plan as-is.

function reviewOutput(context: TurnContext, state: TState, plan: Plan): Promise<Plan>

Parameters

context

TurnContext

Context for the current turn of conversation.

state

TState

Application state for the current turn of conversation.

plan
Plan

Plan generated by the planner.

Returns

Promise<Plan>

A promise that resolves to the plan.