@microsoft/teams-ai
Version:
SDK focused on building AI based applications for Microsoft Teams.
38 lines • 1.66 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 { DataSource } from '../dataSources';
import { Memory } from '../MemoryFork';
/**
* A section that renders a data source to a prompt.
*/
export declare class DataSourceSection extends PromptSectionBase {
private readonly _dataSource;
/**
* Creates a new `DataSourceSection` instance.
* @param {DataSource} dataSource - The data source to render.
* @param {number} tokens - Desired number of tokens to render.
*/
constructor(dataSource: DataSource, tokens: number);
/**
* @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<string>[]>>} Rendered prompt section as a string.
*/
renderAsMessages(context: TurnContext, memory: Memory, functions: PromptFunctions, tokenizer: Tokenizer, maxTokens: number): Promise<RenderedPromptSection<Message<string>[]>>;
}
//# sourceMappingURL=DataSourceSection.d.ts.map