store

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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.

func AggregatedUsage added in v1.8.0

func AggregatedUsage(s *store.Store, tenantID string, start, end int64) ([]Summary, error)

AggregatedUsage returns the aggregated usage data for the given tenant and time range.

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

func GetUsagesByGroups(s *store.Store, tenantID string, start, end int64) ([]*UsageByGroup, error)

GetUsagesByGroups returns the aggregated usage data by groups for the given tenant and time range.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL