IntelligenceX
Class

ChatGptUsageCacheEntry

Namespace IntelligenceX.OpenAI.Usage
Assembly IntelligenceX
Modifiers sealed

Represents a cached usage snapshot entry.

Inheritance

  • Object
  • ChatGptUsageCacheEntry

Constructors

public ChatGptUsageCacheEntry(ChatGptUsageSnapshot snapshot, DateTimeOffset updatedAt) #

Initializes a new cache entry.

Parameters

snapshot IntelligenceX.OpenAI.Usage.ChatGptUsageSnapshot
Usage snapshot.
updatedAt System.DateTimeOffset
Timestamp when the snapshot was stored.

Methods

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

Parses a cache entry from JSON.

Parameters

obj IntelligenceX.Json.JsonObject
Source JSON object.

Returns

The parsed cache entry or null.

public JsonObject ToJson() #
Returns: JsonObject

Serializes the cache entry to JSON.

Properties

public ChatGptUsageSnapshot Snapshot { get; } #

Gets the cached usage snapshot.

public DateTimeOffset UpdatedAt { get; } #

Gets the timestamp when the snapshot was updated.