IntelligenceX
Class

ThreadUsageSummary

Namespace IntelligenceX.OpenAI.AppServer.Models
Assembly IntelligenceX
Modifiers sealed

Represents cumulative token usage for a thread/session.

Inheritance

  • Object
  • ThreadUsageSummary

Constructors

public ThreadUsageSummary(Nullable<Int64> inputTokens, Nullable<Int64> outputTokens, Nullable<Int64> totalTokens, Nullable<Int32> turns, JsonObject raw, JsonObject additional) #

Initializes a new usage summary model.

Parameters

inputTokens System.Nullable{System.Int64} requiredposition: 0
outputTokens System.Nullable{System.Int64} requiredposition: 1
totalTokens System.Nullable{System.Int64} requiredposition: 2
turns System.Nullable{System.Int32} requiredposition: 3
raw IntelligenceX.Json.JsonObject requiredposition: 4
additional IntelligenceX.Json.JsonObject requiredposition: 5

Methods

public static ThreadUsageSummary FromJson(JsonObject obj) #
Returns: ThreadUsageSummary

Parses usage summary from JSON.

Parameters

obj IntelligenceX.Json.JsonObject requiredposition: 0
Source JSON object.

Returns

The parsed summary or null.

public JsonObject ToJson() #
Returns: JsonObject

Serializes usage summary to JSON.

Properties

public Nullable<Int64> InputTokens { get; } #

Gets cumulative input token count.

public Nullable<Int64> OutputTokens { get; } #

Gets cumulative output token count.

public Nullable<Int64> TotalTokens { get; } #

Gets cumulative total token count.

public Nullable<Int32> Turns { get; } #

Gets number of turns with usage recorded.

public JsonObject Raw { get; } #

Gets the raw JSON object.

public JsonObject Additional { get; } #

Gets unrecognized fields from the payload.