mirror of
https://github.com/coalaura/whiskr.git
synced 2025-12-02 20:22:52 +00:00
include upstream inference cost for byok
This commit is contained in:
4
stats.go
4
stats.go
@@ -45,6 +45,10 @@ func HandleStats(w http.ResponseWriter, r *http.Request) {
|
||||
Time: Nullable(generation.GenerationTime, 0),
|
||||
}
|
||||
|
||||
if generation.IsBYOK && generation.UpstreamInferenceCost != nil {
|
||||
statistics.Cost += *generation.UpstreamInferenceCost
|
||||
}
|
||||
|
||||
nativeIn := Nullable(generation.NativeTokensPrompt, 0)
|
||||
normalIn := Nullable(generation.TokensPrompt, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user