PrismChainStep<T extends Object> class
A single step in a PrismPromptChain.
prompt can reference the output of previous steps using named
placeholders: {{step1.field}} or {{input.field}}.
parse extracts a typed value from the model's response, so the next step can reference it by the step's outputKey.
Constructors
- PrismChainStep({required String prompt, required String outputKey, required Object parse(String response)})
-
Creates a chain step.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- outputKey → String
-
The key this step's parsed output is stored under.
final
- parse → Object Function(String response)
-
Parses the raw model response into the value stored under outputKey.
final
- prompt → String
-
The prompt template.
{{…}}placeholders are replaced with values from the context.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited