#[non_exhaustive]pub struct TaskRecord {Show 16 fields
pub task_id: String,
pub parent: Option<String>,
pub depth: u8,
pub kind: String,
pub prompt_ref: Option<PromptRef>,
pub provider_key: Option<ProviderKey>,
pub model_key: Option<ModelKey>,
pub params: TaskParams,
pub input_digest: Option<Digest>,
pub rendered: Option<Value>,
pub raw_output: Option<String>,
pub parsed: Option<Value>,
pub verdict: TaskVerdict,
pub input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub latency_ms: Option<u64>,
}Expand description
One call of one model task: what it was asked under, and what became of the answer.
Identifiers are paths (u2/extract, u2/extract#repair1), so the calls of one
turn read as the graph they ran as. The rendered prompt and the raw answer are
kept only when the deployment asks for them.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.task_id: StringWhere the call sits in the turn.
parent: Option<String>The task that asked for this one.
depth: u8How many calls ran before it in its chain.
kind: StringThe task kind, as its routing purpose names it.
prompt_ref: Option<PromptRef>The instructions it ran under.
provider_key: Option<ProviderKey>The provider that answered, when one did.
model_key: Option<ModelKey>The model that answered, when one did.
params: TaskParamsThe settings the call was sent with.
input_digest: Option<Digest>Digest of the request as sent.
rendered: Option<Value>The request as sent, when the deployment keeps prompts.
raw_output: Option<String>The answer as received, when the deployment keeps it.
parsed: Option<Value>The answer as parsed, when it parsed.
verdict: TaskVerdictWhat the runtime made of it.
input_tokens: Option<u64>Prompt tokens the provider reported.
output_tokens: Option<u64>Output tokens the provider reported.
latency_ms: Option<u64>Wall-clock time of the call.