one-api/relay/util
Laisky.Cai cad6f9d3ba fix: Improve quota consumption and logging in relay controller
- Modify `PostConsumeQuota` function in `common.go` to check if `totalQuota` is less than 0 and add error logging
- Update log content in `RecordConsumeLog` function of `common.go` to include model ratio and group ratio
- Change the method of calculating user used quota and request count in `UpdateUserUsedQuotaAndRequestCount` function of `common.go`
- Implement calculation of `completionRatio` and update `quota` calculation based on `completionRatio` in `postConsumeQuota` function of `helper.go`
- Implement error handling for `model.PostConsumeTokenQuota` and `model.CacheUpdateUserQuota` in `helper.go`
- Update `UserUsedQuota` and `ChannelUsedQuota` with new `quota` value in `helper.go`
2024-03-08 03:22:29 +00:00
..
billing.go chore: update module name 2024-01-28 19:38:58 +08:00
common.go fix: Improve quota consumption and logging in relay controller 2024-03-08 03:22:29 +00:00
init.go chore: update module name 2024-01-28 19:38:58 +08:00
model_mapping.go refactor: refactor relay part (#957) 2024-01-21 23:21:42 +08:00
relay_meta.go fix: Switch to channel-ratio 2024-03-01 13:49:23 +00:00
validation.go refactor: use adaptor to do relay & test 2024-02-18 00:15:31 +08:00