mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- Renamed fields in LLMResponseUsage struct to better reflect their purpose, changing InputTokens and OutputTokens to PromptTokens and CompletionTokens. - Modified GetUsage method in ChatMessage to accept an optional contents parameter, improving flexibility in usage tracking. - Ensured consistent field naming and improved clarity in token usage aggregation logic.
8 lines
253 B
Go
8 lines
253 B
Go
package entity
|
|
|
|
type LLMResponseUsage struct {
|
|
PromptTokens int `json:"prompt_tokens" bson:"prompt_tokens"`
|
|
CompletionTokens int `json:"completion_tokens" bson:"completion_tokens"`
|
|
TotalTokens int `json:"total_tokens" bson:"total_tokens"`
|
|
}
|