Commit Graph

442 Commits

Author SHA1 Message Date
Laisky.Cai
aa30c37e3c Merge branch 'upstream/main' 2025-02-03 12:25:00 +00:00
JustSong
8fa9df5b3c feat: enhance email notifications with HTML templates and improved content
Some checks are pending
CI / Unit tests (push) Waiting to run
CI / commit_lint (push) Waiting to run
2025-02-02 16:39:30 +08:00
JustSong
19998ebb8a feat: update i18n messages and improve error handling 2025-02-02 16:25:52 +08:00
JustSong
c64b7c891f chore: update default theme style 2025-02-02 16:02:38 +08:00
JustSong
8f40e11c97 feat: initial official i18n support for backend 2025-02-02 15:09:31 +08:00
Laisky.Cai
acd9cc0db5 Merge branch 'upstream/main' 2025-02-01 13:17:28 +00:00
JustSong
fa2a772731 feat: able to query test log 2025-01-31 21:23:12 +08:00
Laisky.Cai
f47c70aaa2 Merge branch 'upstream/main' 2025-01-31 10:32:35 +00:00
JustSong
d0402f9086 feat: record request_id 2025-01-31 17:54:04 +08:00
Laisky.Cai
d5fa98f2e0 fix: translate error messages and comments to English for consistency 2025-01-27 03:34:27 +00:00
Laisky.Cai
59dba5bef3 fix: update error messages to English for consistency 2025-01-27 01:25:09 +00:00
Laisky.Cai
531f832d1e refactor: update variable names and improve code readability; add Makefile for linting and installation 2025-01-23 03:32:41 +00:00
Laisky.Cai
13b1b165bd refactor: update UI text and error messages to English for better accessibility 2025-01-19 12:59:58 +00:00
Laisky.Cai
a9604fd59c Merge branch 'upstream/main' 2024-12-22 12:13:47 +00:00
Ke Wang
95e8c16338
feat: add balance query support for DeepSeek (#1946)
* Support Balance Query for DeepSeek

* Fix
2024-12-22 19:26:33 +08:00
Ke Wang
cb9d0a74c9
fix: fix balance query for siliconflow (#1960) 2024-12-22 18:48:47 +08:00
Laisky.Cai
dc181dd7fa Merge branch 'upstream/main' 2024-12-22 02:50:40 +00:00
Laisky.Cai
e9f117ff72
feat: add gemini-2.0-flash-exp and fix race condition in processChannelRelayError (#1983)
Some checks are pending
CI / Unit tests (push) Waiting to run
CI / commit_lint (push) Waiting to run
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
2024-12-21 20:32:30 +08:00
JustSong
45b51ea0ee feat: update feishu oauth login 2024-12-20 23:27:00 +08:00
Laisky.Cai
09bfd61f2e refactor: replace Laisky/errors with pkg/errors for improved error handling 2024-12-20 03:06:09 +00:00
Laisky.Cai
33493aa8b3 fix: resolve race condition in processChannelRelayError and update API version handling for gemini-2.0-flash-exp 2024-12-15 02:06:35 +00:00
Laisky.Cai
f322f8029d fix: enhance token status handling in UpdateToken function with additional cases 2024-11-20 03:02:21 +00:00
Laisky.Cai
0d9c79be35 fix: update Go base image version and enhance token status checks in UpdateToken function 2024-11-20 02:52:09 +00:00
Laisky.Cai
0e335db90c feat: add remaining quota and status fields to token update 2024-11-20 02:43:41 +00:00
Laisky.Cai
2e5e6faad7 Merge remote-tracking branch 'origin/upstream/main' 2024-10-29 01:15:54 +00:00
liangjs
3716e1b0e6
fix: use modelMap when testing a channel (#1855)
Co-authored-by: oliang <oliang@tencent.com>
2024-10-27 17:06:41 +08:00
Laisky.Cai
3f905ea0a4 Merge branch 'upstream/main' 2024-09-25 09:22:57 +00:00
TimeTrapzz
a21681096a
feat: add siliconflow usage (#1798) 2024-09-22 16:31:26 +08:00
OnEvent
99c8c77504
feat: add oidc support (#1725)
Some checks are pending
CI / Unit tests (push) Waiting to run
CI / commit_lint (push) Waiting to run
* feat: add the ui for configuring the third-party standard OAuth2.0/OIDC.

- update SystemSetting.js
- add setup ui
- add configuration

* feat: add the ui for "allow the OAuth 2.0 to login"

- update SystemSetting.js

* feat: add OAuth 2.0 web ui and its process functions

- update common.js
- update AuthLogin.js
- update config.js

* fix: missing "Userinfo" endpoint configuration entry, used by OAuth clients to request user information from the IdP.

- update config.js
- update SystemSetting.js

* feat: updated the icons for Lark and OIDC to match the style of the icons for WeChat, EMail, GitHub.

- update lark.svg
- new oidc.svg

* refactor: Changing OAuth 2.0 to OIDC

* feat: add OIDC login method

* feat: Add support for OIDC login to the backend

* fix: Change the AppId and AppSecret on the Web UI to the standard usage: ClientId, ClientSecret.

* feat: Support quick configuration of OIDC through Well-Known Discovery Endpoint

* feat: Standardize terminology, add well-known configuration

- Change the AppId and AppSecret on the Server End to the standard usage: ClientId, ClientSecret.
- add Well-Known configuration to store in database, no actual use in server end but store and display in web ui only
2024-09-21 23:03:20 +08:00
qinguoyi
3a27c90910
fix: getTokenById return token nil, make panic (#1728)
* fix:getTokenById return token nil, make panic

* chore: remove useless err check

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-09-21 23:00:29 +08:00
Laisky.Cai
4c96688e7c Merge remote-tracking branch 'origin/upstream/main' 2024-07-23 01:14:23 +00:00
Laisky.Cai
c936198ac8
feat: add Proxy channel type and relay mode (#1678)
Add the Proxy channel type and relay mode to support proxying requests to custom upstream services.
2024-07-22 22:51:19 +08:00
Laisky.Cai
f9417d32e1 Merge remote-tracking branch 'origin/upstream/main' 2024-07-09 06:28:06 +00:00
Qiying Wang
d7a78f3397
feat: support test specific model (#1600) 2024-07-05 18:05:16 +08:00
Laisky.Cai
c20f27ec45 Merge remote-tracking branch 'origin/upstream/main' 2024-07-01 03:09:33 +00:00
igophper
34cb147a74
refactor: replace hardcoded string with ctxkey constant (#1579)
Co-authored-by: 江杭辉 <jianghanghui@k.app>
2024-06-30 16:13:43 +08:00
Laisky.Cai
4fd0b247d2 chore: decrease token quota in ConsumeToken function
This commit modifies the ConsumeToken function in the token.go file to decrease the token quota by the specified amount. It replaces the previous code that directly updated the quota values with a call to the DecreaseTokenQuota function from the model package. This change improves code clarity and maintainability.

Closes #123
2024-06-25 06:15:07 +00:00
Laisky.Cai
671039f050 fix: Update AddUsedQuota data type in consumeTokenRequest struct 2024-06-25 06:08:33 +00:00
Laisky.Cai
078be37e87 chore: Update consumeTokenRequest struct in token.go for better clarity 2024-06-24 08:20:49 +00:00
Laisky.Cai
4eade81869 chore: add endpoint for consuming tokens
This commit adds a new endpoint `/token/consume` to the API router, allowing users to consume tokens from another source. It includes changes to the `token.go` file in the `controller` package.
2024-06-24 07:58:14 +00:00
Laisky.Cai
a8cc96bf4a chore: update token.go to record consumption log 2024-06-24 06:14:58 +00:00
Laisky.Cai
1d82e509aa chore: refactor updateTokenDto struct in token.go for better clarity 2024-06-24 06:06:57 +00:00
Laisky.Cai
0e35db82d5 chore: Update token.go to allow admin to add or subtract used quota 2024-06-24 05:52:23 +00:00
Laisky.Cai
115287b8cf Merge remote-tracking branch 'origin/upstream/main' 2024-06-17 03:16:36 +00:00
jinjianming
f74577141c
fix: fix default token not created in some cases (#1510)
* 修复git、微信等用户注册不会创建默认令牌问题

修复git、微信等用户注册不会创建默认令牌问题

* 修复git、微信等用户注册不会创建默认令牌问题

删除普通用户注册代码

* fix: do not block if error happened

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-06-13 00:20:48 +08:00
Laisky.Cai
c524e60d9f Merge remote-tracking branch 'origin/upstream/main' 2024-05-29 06:12:37 +00:00
JustSong
ceea4c6d4a feat: support user content download proxy & relay proxy now 2024-05-29 01:14:00 +08:00
carey036
b53e00a9b3
feat: generate default token after register (#1401)
* feat: generate default token after register

* chore: use go routine to create default token for new user

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-05-28 01:44:38 +08:00
Ghostz
fa74ba0eaa
chore: print user id when relay error happened (#1447)
* add userid when relay error

* chore: update log format

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-05-28 01:30:51 +08:00
Laisky.Cai
ca23dd9a97 Merge commit '1c2654320e5b6268b13b6efca40ce37a523d032b' 2024-04-28 01:53:31 +00:00