mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-27 02:05:56 +08:00
feat: support aws bedrockruntime claude3
closes #622, closes #749, closes #1300
This commit is contained in:
@@ -109,9 +109,10 @@ func RelayImageHelper(c *gin.Context, relayMode int) *relaymodel.ErrorWithStatus
|
||||
}
|
||||
|
||||
defer func(ctx context.Context) {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
if resp != nil && resp.StatusCode != http.StatusOK {
|
||||
return
|
||||
}
|
||||
|
||||
err := model.PostConsumeTokenQuota(meta.TokenId, quota)
|
||||
if err != nil {
|
||||
logger.SysError("error consuming token remain quota: " + err.Error())
|
||||
|
||||
Reference in New Issue
Block a user