/** * @module teams-ai */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { TurnContext } from 'botbuilder'; import { RenderedPromptSection } from '../prompts'; import { Tokenizer } from '../tokenizers'; import { DataSource } from './DataSource'; import { Memory } from '../MemoryFork'; /** * A data source that can be used to add a static block of text to a prompt. * @remarks * Primarily used for testing but could be used to inject some externally define text into a * prompt. The text will be truncated to fit within the `maxTokens` limit. */ export declare class TextDataSource implements DataSource { private readonly _name; private readonly _text; private _tokens?; /** * Creates a new `TextDataSource` instance. * @param {string} name Name of the data source. * @param {string} text Text to inject into the prompt. */ constructor(name: string, text: string); /** * @returns {string} Name of the data source. */ get name(): string; /** * Renders the data source as a string of text. * @param {TurnContext} context Turn 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 when rendering the data source. * @param {number} maxTokens Maximum number of tokens allowed to be rendered. * @returns {Promise>} The text to inject into the prompt as a `RenderedPromptSection` object. */ renderData(context: TurnContext, memory: Memory, tokenizer: Tokenizer, maxTokens: number): Promise>; } //# sourceMappingURL=TextDataSource.d.ts.map