@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
42 lines • 2 kB
TypeScript
/**
* @module teams-ai
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Message } from './Message';
import { PromptFunctions } from './PromptFunctions';
import { RenderedPromptSection } from './PromptSection';
import { PromptSectionBase } from './PromptSectionBase';
import { TurnContext } from 'botbuilder';
import { Tokenizer } from '../tokenizers';
import { Memory } from '../MemoryFork';
/**
* Message containing the response to a function call.
*/
export declare class FunctionResponseMessage extends PromptSectionBase {
private _text;
private _length;
readonly name: string;
readonly response: any;
/**
* Creates a new 'FunctionResponseMessage' instance.
* @param {string} name - Name of the function that was called.
* @param {any} response - The response returned by the called function.
* @param {number} tokens - Optional. Sizing strategy for this section. Defaults to `auto`.
* @param {string} functionPrefix - Optional. Prefix to use for function messages when rendering as text. Defaults to `user: ` to simulate the response coming from the user.
*/
constructor(name: string, response: any, tokens?: number, functionPrefix?: string);
/**
* @private
* @param {TurnContext} context - Context for the current turn of conversation.
* @param {Memory} memory - Memory to use for rendering.
* @param {PromptFunctions} functions - Prompt functions to use for rendering.
* @param {Tokenizer} tokenizer - Tokenizer to use for encoding text.
* @param {number} maxTokens - Maximum number of tokens allowed.
* @returns {Promise<RenderedPromptSection<Message[]>>} Rendered prompt section as a string.
*/
renderAsMessages(context: TurnContext, memory: Memory, functions: PromptFunctions, tokenizer: Tokenizer, maxTokens: number): Promise<RenderedPromptSection<Message[]>>;
}
//# sourceMappingURL=FunctionResponseMessage.d.ts.map