Class
ChatGptUsageService
Retrieves ChatGPT usage, rate limits, and credit usage events.
Inheritance
- Object
- ChatGptUsageService
Constructors
public ChatGptUsageService(OpenAINativeOptions options) #Initializes a new usage service using native auth options.
Parameters
- options IntelligenceX.OpenAI.Native.OpenAINativeOptions
- Native options used for authentication and endpoints.
Methods
public Task<IReadOnlyList<ChatGptCreditUsageEvent>> GetCreditUsageEventsAsync(CancellationToken cancellationToken = null) #Returns:
Task<IReadOnlyList<ChatGptCreditUsageEvent>>Retrieves recent credit usage events.
Parameters
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public async Task<ChatGptUsageReport> GetReportAsync(Boolean includeEvents, CancellationToken cancellationToken = null) #Returns:
Task<ChatGptUsageReport>Retrieves a combined usage report.
Parameters
- includeEvents System.Boolean
- Whether to include credit usage events.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public Task<ChatGptUsageSnapshot> GetUsageSnapshotAsync(CancellationToken cancellationToken = null) #Returns:
Task<ChatGptUsageSnapshot>Retrieves the current usage snapshot.
Parameters
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object