Retrieve the default raw PromptTemplate object.
the id of the PromptTemplate
Allows to directly replace placeholders in the prompt. The supported format is 'Hi {{name}}!'. The placeholder is then searched inside the args object and replaced. Function references are also supported via format '~{functionId}'.
the id of the prompt
Optional
args: { the object with placeholders, mapping the placeholder key to the value
Retrieve the raw PromptTemplate object (unresolved variables, functions and including comments).
the id of the PromptTemplate
Retrieve the unresolved PromptTemplate object (unresolved variables, functions, excluding comments)
the id of the PromptTemplate
Retrieve the currently selected variant ID for a given main prompt ID. If a variant is selected for the main prompt, it will be returned. Otherwise, the main prompt ID will be returned.
the id of the main prompt
the variant ID if one is selected, or the main prompt ID otherwise
Retrieve all variant IDs of a given PromptTemplate.
the id of the main PromptTemplate
an array of string IDs representing the variants of the given template
Adds a PromptTemplate to the list of prompts.
the prompt template to store
Return all known prompts as a map.