MCPcopy Index your code
hub / github.com/coder/coder / convertChatCostUserRollup

Function convertChatCostUserRollup

coderd/exp_chats.go:6443–6458  ·  view source on GitHub ↗
(user database.GetChatCostPerUserRow)

Source from the content-addressed store, hash-verified

6441}
6442
6443func convertChatCostUserRollup(user database.GetChatCostPerUserRow) codersdk.ChatCostUserRollup {
6444 return codersdk.ChatCostUserRollup{
6445 UserID: user.UserID,
6446 Username: user.Username,
6447 Name: user.Name,
6448 AvatarURL: user.AvatarURL,
6449 TotalCostMicros: user.TotalCostMicros,
6450 MessageCount: user.MessageCount,
6451 ChatCount: user.ChatCount,
6452 TotalInputTokens: user.TotalInputTokens,
6453 TotalOutputTokens: user.TotalOutputTokens,
6454 TotalCacheReadTokens: user.TotalCacheReadTokens,
6455 TotalCacheCreationTokens: user.TotalCacheCreationTokens,
6456 TotalRuntimeMs: user.TotalRuntimeMs,
6457 }
6458}
6459
6460func convertChatQueuedMessage(m database.ChatQueuedMessage) codersdk.ChatQueuedMessage {
6461 return db2sdk.ChatQueuedMessage(m)

Callers 1

chatCostUsersMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected