IntelligenceX
Class

ChatGptCreditUsageEvent

Namespace IntelligenceX.OpenAI.Usage
Assembly IntelligenceX
Modifiers sealed

Represents a single credit usage event.

Inheritance

  • Object
  • ChatGptCreditUsageEvent

Constructors

public ChatGptCreditUsageEvent(String date, String productSurface, Nullable<Double> creditAmount, String usageId, JsonObject raw, JsonObject additional) #

Initializes a new credit usage event.

Parameters

date System.String
productSurface System.String
creditAmount System.Nullable{System.Double}
usageId System.String
raw IntelligenceX.Json.JsonObject
additional IntelligenceX.Json.JsonObject

Methods

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

Parses a credit usage event from JSON.

Parameters

obj IntelligenceX.Json.JsonObject
Source JSON object.

Returns

The parsed credit usage event.

public JsonObject ToJson() #
Returns: JsonObject

Serializes the event to a JSON object.

Properties

public String Date { get; } #

Gets the event date.

public String ProductSurface { get; } #

Gets the product surface identifier.

public Nullable<Double> CreditAmount { get; } #

Gets the credit amount for the event.

public String UsageId { get; } #

Gets the usage id when present.

public JsonObject Raw { get; } #

Gets the raw JSON object.

public JsonObject Additional { get; } #

Gets unrecognized fields from the payload.