one-api/relay/controller
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
..
audio.go fix: Switch to channel-ratio 2024-03-01 13:49:23 +00:00
helper.go fix: Improve quota consumption and logging in relay controller 2024-03-08 03:22:29 +00:00
image.go Merge remote-tracking branch 'origin/upstream/main' 2024-03-05 01:02:35 +00:00
text.go fix: Log request URL for non-ok status codes 2024-03-05 01:08:44 +00:00