Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
MentorModelCall record
The MentorModelCall record of Novior.MentorAgent.Abstractions.Models: One call to a model, as IMentorActionObserver.OnModelCallAsync receives it: the tokens…
In questa pagina
One call to a model, as IMentorActionObserver.OnModelCallAsync receives it: the tokens it used, the agent it is attributed to, and for whom. One for each call — each round trip of an agent, each check of a classifier — so a turn has several. Never the text of the request or of the answer. More properties may be added.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.
public sealed record MentorModelCall : IEquatable<MentorModelCall>
dotnet add package Novior.MentorAgent.AbstractionsRemarks
Section titled “Remarks”The calls and the decisions (MentorActionDecision) reach an observer on two queues of their own, so the order between a call and a decision is not kept. Both carry MentorModelCall.SessionId, MentorModelCall.TurnId and MentorModelCall.Timestamp: sort by them to put a turn back together. The totals per model of the dashboard are MentorModelUsage.
Constructors
Section titled “Constructors”public MentorModelCall()
Properties
Section titled “Properties”AgentKind
Section titled “AgentKind”public MentorAgentKind? AgentKind { get; init; }
The kind of agent the call is attributed to, or null for a check MentorAgent makes on its own (MentorModelCall.Purpose says which).
AgentName
Section titled “AgentName”public string? AgentName { get; init; }
The name of the agent the call is attributed to, when it has one.
CachedInputTokens
Section titled “CachedInputTokens”public long? CachedInputTokens { get; init; }
Of MentorModelCall.InputTokens, those the provider read from its cache, when it says so.
Duration
Section titled “Duration”public TimeSpan Duration { get; init; }
How long the call took.
InputTokens
Section titled “InputTokens”public long InputTokens { get; init; }
The tokens of the request; 0 when MentorModelCall.UsageMeasured is false.
ModelId
Section titled “ModelId”public string? ModelId { get; init; }
The model that answered, as the provider named it, else the deployment the client points at.
Outcome
Section titled “Outcome”public required MentorModelCallOutcome Outcome { get; init; }
How the call ended.
OutputTokens
Section titled “OutputTokens”public long OutputTokens { get; init; }
The tokens of the answer; 0 when MentorModelCall.UsageMeasured is false.
Purpose
Section titled “Purpose”public required MentorModelCallPurpose Purpose { get; init; }
What the call was for: the agent's reply, or one of MentorAgent's own checks.
ReasoningTokens
Section titled “ReasoningTokens”public long? ReasoningTokens { get; init; }
Of MentorModelCall.OutputTokens, those spent on reasoning, when the provider says so.
SessionId
Section titled “SessionId”public string? SessionId { get; init; }
An opaque id of the session, the same as MentorActionDecision.SessionId.
Surface
Section titled “Surface”public required MentorActionSurface Surface { get; init; }
Where the turn came from.
TenantId
Section titled “TenantId”public string? TenantId { get; init; }
The tenant of the turn, as MentorActionDecision.TenantId.
Timestamp
Section titled “Timestamp”public required DateTimeOffset Timestamp { get; init; }
When the call ended.
TurnId
Section titled “TurnId”public string? TurnId { get; init; }
An opaque id of the turn, the same as MentorActionDecision.TurnId; none outside a turn.
UsageMeasured
Section titled “UsageMeasured”public bool UsageMeasured { get; init; }
Whether the provider said how many tokens the call used. A stream without a usage part, a call that failed or was stopped: the counts are unknown, not zero.
public ClaimsPrincipal? User { get; init; }
The signed-in user who asked, as MentorActionDecision.User; null when nobody is.
