UNPKG

@microsoft/teams-ai

Version:

SDK focused on building AI based applications for Microsoft Teams.

41 lines 1.48 kB
"use strict"; /** * @module teams-ai */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DefaultModerator = void 0; /** * 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. * @template TState Optional. The Application's turn state. */ class DefaultModerator { /** * Allows all prompts by returning undefined. * @param {TurnContext} context - The context object for the turn. * @param {TState} state - The current turn state. * @returns {Promise<Plan | undefined>} A promise that resolves to undefined. */ reviewInput(context, state) { // Just allow prompt return Promise.resolve(undefined); } /** * Allows all plans by returning the plan as-is. * @param {TurnContext} context - Context for the current turn of conversation. * @param {TState} state - Application state for the current turn of conversation. * @param {Plan} plan - Plan generated by the planner. * @returns {Promise<Plan>} A promise that resolves to the plan. */ reviewOutput(context, state, plan) { // Just approve generated plan return Promise.resolve(plan); } } exports.DefaultModerator = DefaultModerator; //# sourceMappingURL=DefaultModerator.js.map