IntelligenceX
Class

ChatGptUsageCache

Namespace IntelligenceX.OpenAI.Usage
Assembly IntelligenceX
Modifiers static

Helpers for reading and writing the local usage cache.

Inheritance

  • Object
  • ChatGptUsageCache

Methods

public static String ResolveCachePath() #
Returns: String

Resolves the default cache path, honoring INTELLIGENCEX_USAGE_PATH when present.

public static Void Save(ChatGptUsageSnapshot snapshot, String path = null) #
Returns: Void

Saves a usage snapshot to the cache.

Parameters

snapshot IntelligenceX.OpenAI.Usage.ChatGptUsageSnapshot
Snapshot to persist.
path System.String = null
Optional override path.
public static Boolean TryLoad(out ChatGptUsageCacheEntry entry, String path = null) #
Returns: Boolean

Attempts to load a cached usage snapshot.

Parameters

entry IntelligenceX.OpenAI.Usage.ChatGptUsageCacheEntry@
The cache entry when found.
path System.String = null
Optional override path.

Returns

true when a cache entry was loaded.