IntelligenceX

API Reference

Class

ThreadUsageSummary

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(Int64? inputTokens, Int64? outputTokens, Int64? totalTokens, Int32? turns, JsonObject raw, JsonObject? additional) #

Initializes a new usage summary model.

Parameters

inputTokens System.Int64? requiredposition: 0
outputTokens System.Int64? requiredposition: 1
totalTokens System.Int64? requiredposition: 2
turns 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 Int64? InputTokens { get; } #

Gets cumulative input token count.

public Int64? OutputTokens { get; } #

Gets cumulative output token count.

public Int64? TotalTokens { get; } #

Gets cumulative total token count.

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