refactor: 重构流模式逻辑
This commit is contained in:
1 parent
7b20b4ed3d
commit
917c16903c
4 files changed
+114
-123
No files matched your search
@@ -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