Protected
_builtProtected
_defaultProtected
_onProtected
_onProtected
_promptProtected
Readonly
customizationReadonly
onReadonly
onEvent fired when the selected variant for a prompt variant set changes
Protected
Readonly
settingsProtected
Readonly
toolProtected
Readonly
variableAdds a prompt fragment to the service
The fragment to store
Optional
promptVariantSetId: stringOptional ID of the prompt variant set this is a variant of
Protected
addAdds a variant ID to the fragment variants map
The prompt variant set id
The variant ID to add
Whether this variant should be the default for the prompt variant set (defaults to false)
Protected
findFinds a built-in fragment by its ID
The ID of the fragment to find
The built-in fragment or undefined if not found
Gets all active prompts (highest priority version of each fragment)
Array of active prompt fragments
Gets all known prompts, including variants and customizations
Map of fragment IDs to arrays of fragments
Gets the built-in raw prompt fragment (before any customizations)
The prompt fragment ID
The built-in fragment or undefined if not found
Gets the raw prompt fragment without comments
The prompt fragment ID
The raw prompt fragment or undefined if not found
Gets the raw prompt fragment with comments
The prompt fragment ID
The raw prompt fragment or undefined if not found
Resolves a prompt fragment by replacing variables and function references
The prompt fragment ID
Optional
args: { Optional object with values for variable replacement
Optional
context: AIVariableContextOptional context for variable resolution
The resolved prompt fragment or undefined if not found
Resolves a prompt fragment by replacing variables but preserving function references
The prompt fragment ID
Optional
args: { Optional object with values for variable replacement
Optional
context: AIVariableContextOptional context for variable resolution
Optional
resolveVariable: ((variable) => Promise<undefined | ResolvedAIVariable>)Optional custom variable resolution function
The partially resolved prompt fragment or undefined if not found
Protected
initProtected
removeProtected
resolveProtected
resolveCalculates all variable and argument replacements for an unresolved template.
the unresolved template text
Optional
args: { the object with placeholders, mapping the placeholder key to the value
Optional
context: AIVariableContextthe AIVariableContext to use during variable resolution
Optional
resolveVariable: ((variable) => Promise<undefined | ResolvedAIVariable>)the variable resolving method. Fall back to using the AIVariableService if not given.
Object containing replacements and resolved variables
Protected
stripUpdates the selected variant for a prompt variant set
The ID of the agent to update
The prompt variant set ID
The new variant ID to set as selected
Event fired when the prompts change