IntelligenceX
Class

ThreadUsageSummary

IntelligenceX.OpenAI.AppServer.Models

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

Represents cumulative token usage for a thread/session.

Inheritance

  • object
  • ThreadUsageSummary

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 1

Constructors

public ThreadUsageSummary(long? inputTokens, long? outputTokens, long? totalTokens, int? turns, JsonObject raw, JsonObject? additional) #

Initializes a new usage summary model.

Parameters

inputTokens long? required
outputTokens long? required
totalTokens long? required
turns int? required
raw IntelligenceX.Json.JsonObject required
additional IntelligenceX.Json.JsonObject? required

Methods

public static ThreadUsageSummary? FromJson(JsonObject? obj) #

Parses usage summary from JSON.

Parameters

obj IntelligenceX.Json.JsonObject? required
Source JSON object.

Returns

ThreadUsageSummary? The parsed summary or null.
public JsonObject ToJson() #

Serializes usage summary to JSON.

Returns

JsonObject

Properties

public long? InputTokens { get; } #

Gets cumulative input token count.

public long? OutputTokens { get; } #

Gets cumulative output token count.

public long? TotalTokens { get; } #

Gets cumulative total token count.

public int? 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.