DefaultAugmentation class

The default 'none' augmentation.

Remarks

This augmentation does not add any additional functionality to the prompt. It always returns a Plan with a single SAY command containing the models response.

Methods

createPlanFromResponse(TurnContext, Memory, PromptResponse<string>)

Creates a plan given validated response value.

createPromptSection()
validateResponse(TurnContext, Memory, Tokenizer, PromptResponse<string>, number)

Validates a response to a prompt.

Method Details

createPlanFromResponse(TurnContext, Memory, PromptResponse<string>)

Creates a plan given validated response value.

function createPlanFromResponse(context: TurnContext, memory: Memory, response: PromptResponse<string>): Promise<Plan>

Parameters

context

TurnContext

Context for the current turn of conversation.

memory
Memory

An interface for accessing state variables.

response

PromptResponse<string>

The validated and transformed response for the prompt.

Returns

Promise<Plan>

The created plan.

createPromptSection()

function createPromptSection(): undefined | PromptSection

Returns

undefined | PromptSection

Returns an optional prompt section for the augmentation.

validateResponse(TurnContext, Memory, Tokenizer, PromptResponse<string>, number)

Validates a response to a prompt.

function validateResponse(context: TurnContext, memory: Memory, tokenizer: Tokenizer, response: PromptResponse<string>, remaining_attempts: number): Promise<Validation<string>>

Parameters

context

TurnContext

Context for the current turn of conversation with the user.

memory
Memory

An interface for accessing state values.

tokenizer
Tokenizer

Tokenizer to use for encoding and decoding text.

response

PromptResponse<string>

Response to validate.

remaining_attempts

number

Number of remaining attempts to validate the response.

Returns

Promise<Validation<string>>

A Validation object.