Skip to content

RuntimeSlotMatch

PromptScript API


Defined in: core/src/utils/runtime-slots.ts:5

One {{ occurrence found in prompt text.

Properties

kind

kind: "slot" | "escaped" | "invalid"

Defined in: core/src/utils/runtime-slots.ts:11

  • slot: a valid {{input.<name>}}
  • escaped: \{{, rendered as {{
  • invalid: any other unescaped {{

length

length: number

Defined in: core/src/utils/runtime-slots.ts:17

UTF-16 length of the match


name

name: string | null

Defined in: core/src/utils/runtime-slots.ts:13

Input name for a slot, null otherwise


offset

offset: number

Defined in: core/src/utils/runtime-slots.ts:15

UTF-16 offset of the match in the text