ai-gateway/controller
wzxjohn bc7c9105f4
chore: update quota calc logic (close #599) (#627)
* fix: change quota calc code (close #599)

Use float64 during calc and do math.Ceil after calc. This will result in the quota being used slightly more than the official standard, but it will be guaranteed that it will not be less.

* chore: remove blank line

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-11-05 19:15:06 +08:00
..
billing.go chore: update error code 2023-09-17 11:30:20 +08:00
channel-billing.go fix: fix unable to set zero value for base url & model mapping 2023-09-18 22:07:17 +08:00
channel-test.go fix: fix Cloudflare AI Gateway channel test support (#639) 2023-11-05 19:08:25 +08:00
channel.go feat: able to delete all disabled channels 2023-10-14 17:25:48 +08:00
github.go fix: fix oauth2 state not checking 2023-09-15 00:24:20 +08:00
group.go feat: able to set group ratio now (close #62, close #142) 2023-06-11 11:08:16 +08:00
log.go feat: supprt channel priority now & record channel id in log (#484) 2023-09-17 19:18:16 +08:00
misc.go feat: support email domain whitelist (#337) 2023-07-30 12:44:41 +08:00
model.go feat: support chatglm_turbo (#648) 2023-11-05 17:59:38 +08:00
option.go feat: support Tencent's model (close #519) 2023-10-03 14:19:03 +08:00
redemption.go feat: now user can top up via redemption code (close #9) 2023-04-26 17:02:26 +08:00
relay-aiproxy.go feat: support aiproxy's library 2023-09-03 12:51:59 +08:00
relay-ali.go fix: support ali's embedding model (#481, close #469) 2023-09-03 22:12:35 +08:00
relay-audio.go feat: add cloudflare ai gateway support for image & audio (#607) 2023-10-22 17:50:52 +08:00
relay-baidu.go fix: support ali's embedding model (#481, close #469) 2023-09-03 22:12:35 +08:00
relay-claude.go refactor: add set event stream headers func (#402) 2023-08-12 21:55:18 +08:00
relay-image.go feat: add cloudflare ai gateway support for image & audio (#607) 2023-10-22 17:50:52 +08:00
relay-openai.go refactor: add set event stream headers func (#402) 2023-08-12 21:55:18 +08:00
relay-palm.go refactor: add set event stream headers func (#402) 2023-08-12 21:55:18 +08:00
relay-tencent.go feat: support Tencent's model (close #519) 2023-10-03 14:19:03 +08:00
relay-text.go chore: update quota calc logic (close #599) (#627) 2023-11-05 19:15:06 +08:00
relay-utils.go feat: add cloudflare ai gateway support for image & audio (#607) 2023-10-22 17:50:52 +08:00
relay-xunfei.go feat: support xunfei v3 (#637) 2023-10-29 22:03:01 +08:00
relay-zhipu.go refactor: add set event stream headers func (#402) 2023-08-12 21:55:18 +08:00
relay.go refactor: update logging related logic 2023-09-17 15:39:46 +08:00
token.go fix: fix token name too long 2023-08-12 16:58:29 +08:00
user.go feat: able to delete account by self (#294) 2023-07-23 13:37:32 +08:00
wechat.go feat: support aff now (close #75) 2023-06-17 18:12:58 +08:00