Package com.smartgwt.client.docs
Interface CoTPromptScope
public interface CoTPromptScope
A common set of context variables and helper functions are available when using templates for
CoTTask.prompt, CoTProcess.optionalPrompts entries, and CoTTask.taskPrompt.
Context variables
The following objects/values are always available to template expressions:- task — the current CoTTask instance (ID, title, description, etc)
- process — the owning CoTProcess instance (ID, policies, etc)
- goal — equivalent to process.goal
- state — the shared
CoTProcess.state
object for the workflow - inputs — inputs to this task if specified as
task.inputs
; the same data returned byTask.getInputRecord()
(may be absent if inputs were not defined)
Helper functions
- json(x) — render a compact JSON representation of
x
suitable for inclusion in a prompt (intended for small/medium objects). - promptPart(nameOrNames, omitNewlines?) / prt(...) — insert one or more prompt parts as returned by CoTProcess.getPromptPart().