one-api/controller
Laisky.Cai bc8ceca742 feat: api can modify token's used and remains
- Updated base image in Dockerfile from `node:16` to `node:18`
- Added `tokenPatch` struct to handle updates to the `Token` model
- Updated `UpdateToken` function to use `tokenPatch` struct for binding JSON
- Improved error handling and validation for token updates
- Refined checks for token status, expiration, and quota
- Enhanced error handling and response for token updates
- Updated JSON response to include `data` field
2023-09-30 00:53:55 +00: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 unable to set zero value for base url & model mapping 2023-09-18 22:07:17 +08:00
channel.go perf: preallocate array capacity 2023-08-30 21:15:56 +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 chore: update ali's model name 2023-09-23 22:57:59 +08:00
option.go feat: support email domain whitelist (#337) 2023-07-30 12:44:41 +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: supprt channel priority now & record channel id in log (#484) 2023-09-17 19:18:16 +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: supprt channel priority now & record channel id in log (#484) 2023-09-17 19:18:16 +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-text.go feat: supprt channel priority now & record channel id in log (#484) 2023-09-17 19:18:16 +08:00
relay-utils.go chore: update error code 2023-09-17 11:30:20 +08:00
relay-xunfei.go feat: support non-stream mode for xunfei (#498) 2023-09-17 18:16:12 +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 feat: api can modify token's used and remains 2023-09-30 00:53:55 +00: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