IntelligenceX
Class

ChatGptCreditsSnapshot

Namespace IntelligenceX.OpenAI.Usage
Assembly IntelligenceX
Modifiers sealed

Represents a credits snapshot for a ChatGPT account.

Inheritance

  • Object
  • ChatGptCreditsSnapshot

Constructors

public ChatGptCreditsSnapshot(Boolean hasCredits, Boolean unlimited, Nullable<Double> balance, Int32[] approxLocalMessages, Int32[] approxCloudMessages, JsonObject raw, JsonObject additional) #

Initializes a new credits snapshot.

Parameters

hasCredits System.Boolean
unlimited System.Boolean
balance System.Nullable{System.Double}
approxLocalMessages System.Int32[]
approxCloudMessages System.Int32[]
raw IntelligenceX.Json.JsonObject
additional IntelligenceX.Json.JsonObject

Methods

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

Parses a credits snapshot from JSON.

Parameters

obj IntelligenceX.Json.JsonObject
Source JSON object.

Returns

The parsed snapshot or null.

public JsonObject ToJson() #
Returns: JsonObject

Serializes the credits snapshot to a JSON object.

Properties

public Boolean HasCredits { get; } #

Gets a value indicating whether the account has credits.

public Boolean Unlimited { get; } #

Gets a value indicating whether credits are unlimited.

public Nullable<Double> Balance { get; } #

Gets the credits balance, when available.

public Int32[] ApproxLocalMessages { get; } #

Gets approximate local message counts.

public Int32[] ApproxCloudMessages { get; } #

Gets approximate cloud message counts.

public JsonObject Raw { get; } #

Gets the raw JSON object.

public JsonObject Additional { get; } #

Gets unrecognized fields from the payload.