@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
53 lines • 2.55 kB
TypeScript
import { TurnContext } from 'botbuilder';
import { Plan, Planner } from '../../planners/Planner';
import { TurnState } from '../../TurnState';
import { AI } from '../../AI';
/**
* A planner used for testing.
*/
export declare class TestPlanner implements Planner<TurnState> {
/**
* Creates a new `TestPlanner` instance.
* @param {Plan} beginPlan Optional. The plan to return when `beginTask()` is called. Defaults to a plan that says "Hello World".
* @param {Plan} continuePlan Optional. The plan to return when `continueTask()` is called. Defaults to an empty plan.
*/
constructor(beginPlan?: Plan, continuePlan?: Plan);
/**
* The plan to return when `beginTask()` is called.
*/
beginPlan: Plan;
/**
* The plan to return when `continueTask()` is called.
*/
continuePlan: Plan;
/**
* Starts a new task.
* @remarks
* This method is called when the AI system is ready to start a new task. The planner should
* generate a plan that the AI system will execute. Returning an empty plan signals that
* there is no work to be performed.
*
* The planner should take the users input from `state.temp.input`.
* @param {TurnContext} context Context for the current turn of conversation.
* @param {TurnState} state Application state for the current turn of conversation.
* @param {AI<TurnState>} ai The AI system that is generating the plan.
* @returns {Promise<Plan>} The plan that was generated.
*/
beginTask(context: TurnContext, state: TurnState, ai: AI<TurnState>): Promise<Plan>;
/**
* Continues the current task.
* @remarks
* This method is called when the AI system has finished executing the previous plan and is
* ready to continue the current task. The planner should generate a plan that the AI system
* will execute. Returning an empty plan signals that the task is completed and there is no work
* to be performed.
*
* The output from the last plan step that was executed is passed to the planner via `state.temp.input`.
* @param {TurnContext} context Context for the current turn of conversation.
* @param {TurnState} state Application state for the current turn of conversation.
* @param {AI<TurnState>} ai The AI system that is generating the plan.
* @returns {Promise<Plan>} The plan that was generated.
*/
continueTask(context: TurnContext, state: TurnState, ai: AI<TurnState>): Promise<Plan>;
}
//# sourceMappingURL=TestPlanner.d.ts.map