Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelUsageSummary ¶ added in v1.12.0
type ModelUsageSummary struct { UserID string ModelID string TruncatedTimestamp int64 TotalRequests int64 TotalPromptTokens int64 TotalCompletionTokens int64 }
ModelUsageSummary is a struct that represents the usage summary for a specific model, user and truncated timestamp.
func ListModelUsageSummaries ¶ added in v1.12.0
func ListModelUsageSummaries( s *store.Store, tenantID string, startTime, endTime time.Time, interval time.Duration, ) ([]*ModelUsageSummary, error)
ListModelUsageSummaries returns the usage summaries for models grouped by user and truncated by the specified interval.
type Summary ¶ added in v0.10.0
type Summary struct { APIMethod string TotalRequests int64 SuccessRequests int64 FailureRequests int64 AverageLatency float64 }
Summary is a struct that represents the summary of the usage data.
type UsageByGroup ¶ added in v1.3.0
type UsageByGroup struct { APIKeyID string UserID string ModelID string TotalRequests int64 TotalPromptTokens int64 TotalCompletionTokens int64 AverageLatency float64 AverageTimeToFirstToken float64 }
UsageByGroup represents the aggregated usage data grouped by API key, user, and model.
func GetUsagesByGroups ¶ added in v1.8.0
GetUsagesByGroups returns the aggregated usage data by groups for the given tenant and time range.
Click to show internal directories.
Click to hide internal directories.