feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -123,7 +123,7 @@ func ChargeViolationFeeIfNeeded(ctx *gin.Context, relayInfo *relaycommon.RelayIn
|
||||
}
|
||||
|
||||
if err := PostConsumeQuota(relayInfo, feeQuota, 0, true); err != nil {
|
||||
logger.LogError(ctx, fmt.Sprintf("failed to charge violation fee: %s", err.Error()))
|
||||
logger.LogError(ctx, common.LogText("failed to charge violation fee: %s", err.Error()))
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ func ChargeViolationFeeIfNeeded(ctx *gin.Context, relayInfo *relaycommon.RelayIn
|
||||
|
||||
useTimeSeconds := time.Now().Unix() - relayInfo.StartTime.Unix()
|
||||
tokenName := ctx.GetString("token_name")
|
||||
oai := apiErr.ToOpenAIError()
|
||||
oai := apiErr.ToOpenAIError(common.UpstreamAddresses(ctx)...)
|
||||
|
||||
other := model.NewLogOther()
|
||||
other.MergePublic(map[string]any{
|
||||
@@ -152,7 +152,7 @@ func ChargeViolationFeeIfNeeded(ctx *gin.Context, relayInfo *relaycommon.RelayIn
|
||||
ModelName: relayInfo.OriginModelName,
|
||||
TokenName: tokenName,
|
||||
Quota: feeQuota,
|
||||
Content: "Violation fee charged",
|
||||
Content: []*common.Message{common.NewMessage("Violation fee charged")},
|
||||
TokenId: relayInfo.TokenId,
|
||||
UseTimeSeconds: int(useTimeSeconds),
|
||||
IsStream: relayInfo.IsStream,
|
||||
|
||||
Reference in new issue
Block a user