@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
51 lines • 2.41 kB
TypeScript
/**
* @module teams-ai
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { TurnContext } from 'botbuilder-core';
import { Memory } from '../MemoryFork';
import { ChatCompletionAction } from '../models';
import { Plan } from '../planners';
import { PromptSection } from '../prompts';
import { Tokenizer } from '../tokenizers';
import { PromptResponse } from '../types';
import { Validation } from '../validators';
import { Augmentation } from './Augmentation';
/**
* The 'sequence' augmentation.
* @remarks
* This augmentation allows the model to return a sequence of actions to perform.
*/
export declare class SequenceAugmentation implements Augmentation<Plan | undefined> {
private readonly _section;
private readonly _planValidator;
private readonly _actionValidator;
constructor(actions: ChatCompletionAction[]);
/**
* Creates an optional prompt section for the augmentation.
* @returns {PromptSection | undefined} The new PromptSection or undefined.
*/
createPromptSection(): PromptSection | undefined;
/**
* Validates a response to a prompt.
* @param {TurnContext} context - Context for the current turn of conversation with the user.
* @param {Memory} memory - An interface for accessing state values.
* @param {Tokenizer} tokenizer - Tokenizer to use for encoding and decoding text.
* @param {PromptResponse<string>} response - Response to validate.
* @param {number} remaining_attempts - Number of remaining attempts to validate the response.
* @returns {Validation} A `Validation` object.
*/
validateResponse(context: TurnContext, memory: Memory, tokenizer: Tokenizer, response: PromptResponse<string>, remaining_attempts: number): Promise<Validation<Plan | undefined>>;
/**
* Creates a plan given validated response value.
* @param {TurnContext} context - Context for the current turn of conversation.
* @param {Memory} memory - An interface for accessing state variables.
* @param {PromptResponse<Plan|undefined>} response - The validated and transformed response for the prompt.
* @returns {Promise<Plan>} The created plan.
*/
createPlanFromResponse(context: TurnContext, memory: Memory, response: PromptResponse<Plan | undefined>): Promise<Plan>;
}
//# sourceMappingURL=SequenceAugmentation.d.ts.map