Index > prompting

Namespace: prompting

Prompting utilities for Grit workflows.

Interfaces

ButtonPromptSettings

Extends

  • BasePromptSettings

Type parameters

Parameter
OptionType extends string

Properties

PropertyTypeDescription
__typename"PromptSettings"-
kind"buttons"-
messagestring-
name?stringA name for this prompt to use across workflows.
optionsPromptContinueOptions< OptionType >[]-
source?PromptSource-
stepId?string-
targetPromptTarget-
timeout?PromptTimeout-
titlestring-

SelectPromptSettings

Extends

  • BasePromptSettings

Type parameters

Parameter
OptionType extends string

Properties

PropertyTypeDescription
__typename"PromptSettings"-
kind"select"-
messagestring-
name?stringA name for this prompt to use across workflows.
optionsOptionType[]-
placeholder?OptionType-
source?PromptSource-
stepId?string-
targetPromptTarget-
timeout?PromptTimeout-
titlestring-

TextPromptSettings

Extends

  • BasePromptSettings

Properties

PropertyTypeDescription
__typename"PromptSettings"-
kind"text"-
messagestring-
name?stringA name for this prompt to use across workflows.
options?object-
options.action_id?string-
options.multiline?boolean-
source?PromptSource-
stepId?string-
targetPromptTarget-
timeout?PromptTimeout-
titlestring-

Type Aliases

PromptKind

PromptKind: PromptSettings< string >["kind"]


PromptSettings

PromptSettings: <OptionType> SelectPromptSettings< OptionType > | ButtonPromptSettings< OptionType > | TextPromptSettings

Type parameters

Parameter
OptionType extends string

PromptSource

PromptSource: "agent" | undefined


PromptTarget

PromptTarget: "user" | "admin"

Functions

isButtonPromptSettings

isButtonPromptSettings<OptionType>(settings): settings is ButtonPromptSettings<OptionType>

Type parameters

Parameter
OptionType extends string

Parameters

ParameterType
settingsany

Returns

settings is ButtonPromptSettings<OptionType>


isContinuePrompt

isContinuePrompt(promptSettings): boolean

Parameters

ParameterType
promptSettingsPromptSettings< string >

Returns

boolean


isSelectPromptSettings

isSelectPromptSettings<OptionType>(settings): settings is SelectPromptSettings<OptionType>

Type parameters

Parameter
OptionType extends string

Parameters

ParameterType
settingsany

Returns

settings is SelectPromptSettings<OptionType>


isTextPromptSettings

isTextPromptSettings(settings): settings is TextPromptSettings

Parameters

ParameterType
settingsany

Returns

settings is TextPromptSettings


Generated using TypeDoc and typedoc-plugin-markdown