EvaluationRecord

class EvaluationRecord(val usage: Usage<*>, val request: ModelRequest, val outcome: EvaluationRecord.Outcome, val duration: Duration, val attempts: Int)(source)

A finished evaluation, handed to the observer set with AirshipAi.setEvaluationObserver.

Carries the context and prompt your own provider produced, so forwarding a record to a third-party service sends that context off the device.

Parameters

usage

Which feature ran.

request

What was asked. The context here is what was offered — a model that trims to fit its input window does so on its own copy.

outcome

How it ended.

duration

Wall-clock time across every attempt.

attempts

ModelAdapter calls made. Greater than 1 means output failed schema validation, or the model threw, and it was retried.

Constructors

Link copied to clipboard
constructor(usage: Usage<*>, request: ModelRequest, outcome: EvaluationRecord.Outcome, duration: Duration, attempts: Int)

Types

Link copied to clipboard
sealed class Outcome

How an evaluation ended, before parsing into the feature's own type.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

duration in milliseconds, for Java callers — kotlin.time.Duration is a value class and its accessor is name-mangled beyond what Java can call.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val usage: Usage<*>