DataSource interface

A data source that can be used to render text that's added to a prompt.

Properties

name

Name of the data source.

Methods

renderData(TurnContext, Memory, Tokenizer, number)

Renders the data source as a string of text.

Property Details

name

Name of the data source.

name: string

Property Value

string

Method Details

renderData(TurnContext, Memory, Tokenizer, number)

Renders the data source as a string of text.

function renderData(context: TurnContext, memory: Memory, tokenizer: Tokenizer, maxTokens: number): Promise<RenderedPromptSection<string>>

Parameters

context

TurnContext

Turn context for the current turn of conversation with the user.

memory
Memory

An interface for accessing state values.

tokenizer
Tokenizer

Tokenizer to use when rendering the data source.

maxTokens

number

Maximum number of tokens allowed to be rendered.

Returns

Promise<RenderedPromptSection<string>>

The text to inject into the prompt as a RenderedPromptSection object.