IntelligenceX

API Reference

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, String processingTier = null, String model = null) #

Initializes a new credit usage event.

Parameters

date System.String requiredposition: 0
productSurface System.String requiredposition: 1
creditAmount System.Nullable{System.Double} requiredposition: 2
usageId System.String requiredposition: 3
raw IntelligenceX.Json.JsonObject requiredposition: 4
additional IntelligenceX.Json.JsonObject requiredposition: 5
processingTier System.String = null optionalposition: 6
model System.String = null optionalposition: 7

Methods

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

Parses a credit usage event from JSON.

Parameters

obj IntelligenceX.Json.JsonObject requiredposition: 0
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 String ProcessingTier { get; } #

Gets the processing tier when present (for example priority/fast).

public String Model { get; } #

Gets the model identifier when present.

public JsonObject Raw { get; } #

Gets the raw JSON object.

public JsonObject Additional { get; } #

Gets unrecognized fields from the payload.