@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
41 lines • 1.91 kB
TypeScript
/**
* @module teams-ai
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { TurnContext } from 'botbuilder';
import { ChatCompletionAction } from '../models';
import { Memory } from '../MemoryFork';
import { Message, PromptFunctions, RenderedPromptSection, PromptSectionBase } from '../prompts';
import { Tokenizer } from '../tokenizers';
/**
* A prompt section that renders a list of actions to the prompt.
*/
export declare class ActionAugmentationSection extends PromptSectionBase {
private readonly _text;
private _tokens?;
private readonly _actions;
/**
* Creates a new `ActionAugmentationSection` instance.
* @param {ChatCompletionAction[]} actions List of actions to render.
* @param {string} callToAction Text to display after the list of actions.
*/
constructor(actions: ChatCompletionAction[], callToAction: string);
/**
* @returns {Map<string, ChatCompletionAction>} Map of action names to actions.
*/
get actions(): Map<string, ChatCompletionAction>;
/**
* Renders the prompt section as a list of `Message` objects.
* @param {TurnContext} context - Context for the current turn of conversation.
* @param {Memory} memory - Interface for accessing state variables.
* @param {PromptFunctions} functions - Functions for rendering prompts.
* @param {Tokenizer} tokenizer - Tokenizer to use for encoding/decoding text.
* @param {number} maxTokens - Maximum number of tokens allowed for the rendered prompt.
* @returns {Promise<RenderedPromptSection<Message<string>[]>>} The rendered prompt section.
*/
renderAsMessages(context: TurnContext, memory: Memory, functions: PromptFunctions, tokenizer: Tokenizer, maxTokens: number): Promise<RenderedPromptSection<Message<string>[]>>;
}
//# sourceMappingURL=ActionAugmentationSection.d.ts.map