one-api/relay
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
..
channel refactor: Refactor: Improve Anthropic event stream response handling 2024-03-05 08:17:14 +00:00
constant refactor: refactor image relay (close #1068) 2024-03-03 19:30:11 +08:00
controller fix: Improve quota consumption and logging in relay controller 2024-03-08 03:22:29 +00:00
helper refactor: Refactor: Consolidate Anthropic model requests into GeneralOpenAIRequest 2024-03-05 03:38:26 +00:00
model refactor: use adaptor to do relay & test 2024-02-18 00:15:31 +08:00
util fix: Improve quota consumption and logging in relay controller 2024-03-08 03:22:29 +00:00