Table of Contents

Class AgentModelCharged

Namespace
MailFathom.Application.Agent.Conversations
Assembly
MailFathom.Application.dll

What the first call of a run sent and what the provider charged for it.

public sealed record AgentModelCharged : AgentConversationEntry, IEquatable<AgentConversationEntry>, IEquatable<AgentModelCharged>
Inheritance
AgentModelCharged
Implements
Inherited Members

Remarks

This is what the budget a turn is measured against is corrected from. A conversation's size is estimated in characters, because that is what can be counted before anything is sent, and converted into tokens at the rate the last turn was actually charged — so the estimate follows whatever model the deployment is running without this repository keeping a tokenizer for anybody's model.

Only the first call is recorded, because it is the one whose input is the conversation itself: every later call of the same run adds the run's own tool traffic, which says nothing about how the next turn's history will be charged. A provider that reports no usage leaves no entry, and the estimate keeps the rate it had.

Constructors

AgentModelCharged(AgentMessageId, long, long)

What the first call of a run sent and what the provider charged for it.

Fields

Kind

The value the type discriminator carries on the wire.

Properties

ComposedInto

Gets the answer this entry is part of, and null where it belongs to no answer being composed.

EntryName

Gets the name this entry is written under, which is the value the type discriminator carries.

History

Gets which of the conversation's two readings this entry belongs to.

InputTokens

Gets how many input tokens the provider charged for them.

MessageId

The answer whose run made the call.

SentCharacters

Gets how many characters of text the call sent.