DVAIFeature class

An AI feature's operating declaration.

Constructors

DVAIFeature({required String prompt, DVMeterRef? budget, List<DVAIFallback> fallback = const <DVAIFallback>[], List<String> cacheTags = const <String>[], List<Type> context = const <Type>[], Map<Type, List<String>> contextFields = const <Type, List<String>>{}, int maxOutputTokens = 1024, double evalThreshold = 1.0})
const

Properties

budget → DVMeterRef?
final
cacheTags → List<String>
Tags for a cached answer, with {input} placeholders: 'ticket:{id}'. With a cache configured, answers are cached whether or not tags are declared; tags are how a change drops them.
final
context → List<Type>
The models the feature reads. Nothing else can be added to its context.
final
contextFields → Map<Type, List<String>>
Narrows a model in context to these fields.
final
evalThreshold → double
The share of golden transcripts that must pass (DV-AIOPS-007).
final
fallback → List<DVAIFallback>
Tried in order after the primary model, when its budget is spent or its provider fails. Empty means refuse at exhaustion and be unavailable on failure.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
no setter
maxOutputTokens → int
The most output a call may produce, which is what the budget check charges for before the call.
final
prompt → String
The id of the prompt the feature sends. Also the feature's id.
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