API Reference
Class
ChatGptUsageCache
Helpers for reading and writing the local usage cache.
Inheritance
- Object
- ChatGptUsageCache
Methods
ResolveCachePath 2 overloads
public static String ResolveCachePath() #Returns:
StringResolves the default cache path, honoring INTELLIGENCEX_USAGE_PATH when present.
public static String ResolveCachePath(String? accountId) #Returns:
StringResolves the usage cache path for a specific account id.
Parameters
- accountId System.String?
- Optional ChatGPT account id.
public static Void Save(ChatGptUsageSnapshot snapshot, String? path = null) #Returns:
VoidSaves 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:
BooleanAttempts 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.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?