mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-14 18:03:41 +08:00
refactor: 重构流模式逻辑
This commit is contained in:
@@ -36,3 +36,7 @@ func GenerateFinalUsageResponse(id string, createAt int64, model string, usage d
|
||||
Usage: &usage,
|
||||
}
|
||||
}
|
||||
|
||||
func ValidUsage(usage *dto.Usage) bool {
|
||||
return usage != nil && (usage.PromptTokens != 0 || usage.CompletionTokens != 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user