Commit Graph

75 Commits

Author SHA1 Message Date
JustSong
033e832cae feat: able to configure ratio for different models (close #26) 2023-04-28 19:16:37 +08:00
JustSong
84c7ae8ad1 refactor: use tiktoken-go to calculate token number 2023-04-28 18:36:17 +08:00
JustSong
52877f99e8 fix: relay bug fix 2023-04-28 18:16:59 +08:00
JustSong
0760dcf6cc feat: support configuring ratio when estimating token number in stream mode 2023-04-28 17:25:05 +08:00
JustSong
52e92554ac refactor: improve relay's implementation 2023-04-28 17:11:57 +08:00
JustSong
bcdfb7d0d9 feat: now use token as the unit of quota (close #33) 2023-04-28 16:58:55 +08:00
JustSong
aa18ac4864 refactor: use quota instead of times 2023-04-28 14:57:20 +08:00
JustSong
567ff7359c fix: check user's role when manage user (#30) 2023-04-28 09:47:03 +08:00
JustSong
3c31997c4e style: add bottom margin for unlimited times button 2023-04-27 17:18:07 +08:00
JustSong
79dc851aa1 feat: able to set top up link now 2023-04-27 16:32:21 +08:00
JustSong
f820158ee5 fix: check user status when validating token (#23) 2023-04-27 15:05:33 +08:00
JustSong
9667bc86bc fix: root user cannot demote itself now (close #30) 2023-04-27 14:45:12 +08:00
JustSong
4bcc5f54f2 fix: fix MySQL syntax error (#54) 2023-04-27 11:10:10 +08:00
JustSong
a751f30316 fix: specify type for token (close #23) 2023-04-27 09:32:20 +08:00
JustSong
25ff9ebbe1 fix: remove rate limit for relay api 2023-04-26 21:50:09 +08:00
JustSong
9c529f9674 feat: able to set initial quota for new user (close #22) 2023-04-26 21:40:56 +08:00
JustSong
5a9fb6238b feat: able to manage system vai access token (close #12) 2023-04-26 20:54:39 +08:00
JustSong
863d8424b3 feat: download redemption codes as file (#12) 2023-04-26 17:13:08 +08:00
JustSong
be2b3f3fc6 feat: now user can top up via redemption code (close #9) 2023-04-26 17:02:26 +08:00
JustSong
d87bae94f5 fix: allow all origins (close #20) 2023-04-26 15:27:33 +08:00
JustSong
56231eea66 fix: prevent common user from specifying channel id (#12) 2023-04-26 14:49:27 +08:00
JustSong
3616adfc7a fix: allow all origins (close #20) 2023-04-26 14:26:19 +08:00
JustSong
15ac1356bc docs: update LICENSE 2023-04-26 13:04:41 +08:00
JustSong
d82e0f85c8 chore: update gitignore 2023-04-26 13:04:11 +08:00
JustSong
36326c6d72 chore: update Dockerfile 2023-04-26 13:04:01 +08:00
JustSong
da6fd62fb0 ci: remove useless action 2023-04-26 13:00:33 +08:00
JustSong
7b8005a565 docs: update README 2023-04-26 12:58:06 +08:00
JustSong
f3ebe46076 feat: redirect to login page if login expired (close #18) 2023-04-26 11:42:56 +08:00
JustSong
512f9e3ac9 feat: limit the ability of common user to set the remaining usage times of token (#9) 2023-04-26 11:10:14 +08:00
JustSong
f3a7f8127e docs: update Nginx configuration (#3) 2023-04-26 10:50:52 +08:00
JustSong
b612efe349 fix: only reduce remain times when request /v1/chat/completions (close #15)
BREAKING CHANGE: now remain_times is -1 doesn't mean unlimited times anymore!
2023-04-26 10:45:34 +08:00
JustSong
fc8641eb7d docs: update Nginx config (close #3) 2023-04-26 09:57:46 +08:00
JustSong
e779c3a6a0 feat: able to relay dashboard api now 2023-04-25 22:18:27 +08:00
JustSong
858504ff29 chore: update dependency 2023-04-25 21:56:23 +08:00
JustSong
e0e0660867 feat: enable gzip on api route & web route 2023-04-25 21:56:07 +08:00
JustSong
541b9f2ed6 fix: fully support stream mode now (close #3) 2023-04-25 21:50:57 +08:00
JustSong
2ed58bb0c0 fix: improve the implementation of sse 2023-04-25 20:45:50 +08:00
JustSong
796cb86b58 fix: fixing SSE support 2023-04-25 20:27:53 +08:00
Bond
bbaeea9340 docs: add help in command line arguments (#14) 2023-04-25 16:23:17 +08:00
JustSong
5e20246e65 fix: update error message to make it more clear (#13) 2023-04-25 15:13:25 +08:00
JustSong
fb608980fa docs: update deploy tutorial 2023-04-25 14:56:04 +08:00
JustSong
fc637f20af docs: fix typo 2023-04-25 14:51:53 +08:00
JustSong
b67ff8ee91 docs: update README 2023-04-25 14:50:35 +08:00
JustSong
ed9d5206dc docs: update Docker start command (close #8) 2023-04-25 14:31:02 +08:00
JustSong
a8eacd331b fix: relay more headers 2023-04-25 11:30:34 +08:00
JustSong
e8066d9ba1 feat: relay all kinds of requests 2023-04-25 10:57:37 +08:00
JustSong
7c0124451d fix: only keep header Authorization & Content-Type 2023-04-25 10:47:25 +08:00
JustSong
9001415948 fix: fix http2: invalid Connection request header: ["upgrade"] 2023-04-25 10:19:00 +08:00
JustSong
67ece62ff2 fix: copy token to search input if clipboard.writeText is not available (close #6) 2023-04-25 09:46:58 +08:00
JustSong
7856da5d4a feat: improve the token edit page 2023-04-25 09:24:02 +08:00