-
Notifications
You must be signed in to change notification settings - Fork 56
/
reporting.go
32 lines (29 loc) · 1.1 KB
/
reporting.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package event
type DataPoint struct {
TimeStamp int64 `json:"timeStamp"`
NumberOfRequests int64 `json:"numberOfRequests"`
CostInUsd float64 `json:"costInUsd"`
LatencyInMs int `json:"latencyInMs"`
PromptTokenCount int `json:"promptTokenCount"`
CompletionTokenCount int `json:"completionTokenCount"`
SuccessCount int `json:"successCount"`
Model string `json:"model"`
KeyId string `json:"keyId"`
CustomId string `json:"customId"`
UserId string `json:"userId"`
}
type ReportingResponse struct {
DataPoints []*DataPoint `json:"dataPoints"`
LatencyInMsMedian float64 `json:"latencyInMsMedian"`
LatencyInMs99th float64 `json:"latencyInMs99th"`
}
type ReportingRequest struct {
KeyIds []string `json:"keyIds"`
Tags []string `json:"tags"`
CustomIds []string `json:"customIds"`
UserIds []string `json:"userIds"`
Start int64 `json:"start"`
End int64 `json:"end"`
Increment int64 `json:"increment"`
Filters []string `json:"filters"`
}