DVPromptVersion class

One version of one prompt, in a form that can be stored, locked and compared.

Types become their names here, because a store holds text; that is also why a stored version cannot change the shape a call site was compiled against.

Constructors

DVPromptVersion({required String id, required int version, required String system, Map<String, String> input = const <String, String>{}, String? output, DVJsonObject schema = const <String, DVJsonValue>{}})
DVPromptVersion.compiled(DVPrompt prompt, DVPromptTemplate template)
factory
DVPromptVersion.fromJson(Map<String, Object?> json)
factory

Properties

fingerprint → String
A digest of everything a model sees from this version: the wording and the shape. Two versions with one fingerprint are the same prompt.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
input → Map<String, String>
final
output → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schema → DVJsonObject
final
shape → String
A digest of what the call site depends on: input names and types, the output type and the schema. Declaration order does not move it.
no setter
system → String
final
version → int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited