Laisky.Cai
d379377eca
Merge remote-tracking branch 'origin/upstream/main'
2024-03-18 01:31:21 +00:00
Benny
9821bc7281
feat: add user list sorting and pagination enhancements ( #1178 )
...
* feat: add user list sorting and pagination enhancements
* feat: add user list sorting for THEME=air
* feat: add token list sorting and pagination enhancements
* feat: add token list sorting for THEME=air
2024-03-17 19:25:36 +08:00
JustSong
08831881f1
feat: increase initial root user quota and support INITIAL_ROOT_TOKEN now ( #1105 )
2024-03-17 19:09:44 +08:00
Laisky.Cai
41afad713e
Merge remote-tracking branch 'origin/upstream/main'
2024-03-15 09:49:49 +00:00
JustSong
752639560f
feat: able to use separated database for table logs
2024-03-15 00:30:15 +08:00
JustSong
79d0cd378a
fix: fix baidu system prompt ( close #1079 )
2024-03-13 22:56:54 +08:00
JustSong
e99150bdb9
fix: make quota int64
2024-03-13 20:00:51 +08:00
JustSong
a72e5fcc9e
fix: when cached quota is too low, force refresh it
2024-03-13 19:38:44 +08:00
JustSong
0710f8cd66
fix: when cached quota is too low, force refresh it
2024-03-13 19:26:24 +08:00
Laisky.Cai
54203e3d30
fix: Update error handling to Laisky/errors/v2 package across project
...
- Updated error handling across multiple files with `Laisky/errors/v2` package
- Replaced hardcoded error messages with `Laisky/errors` in relay/channel/tencent/adaptor.go
- Added a function to check if a request should be retried in relay/controller/relay.go
- Removed unused imports and variables, and updated comments in various files
- Changed Redis cache handling in model/cache.go
- Refactored error handling in relay/channel/tencent/main.go and relay/channel/baidu/main.go
- Updated import paths and error handling in model/user.go, model/redemption.go, and controller/github.go
- Added import for tiktoken-go package in relay/channel/openai/token.go
- Added GetSign and ParseConfig functions in relay/channel/tencent/main.go
- Replaced specific error imports with a more general one in relay/channel/ali/adaptor.go
- Updated import comments and function calls in relay/channel/ali/adaptor.go
- Added checks and custom error messages in model/token.go
- Removed unused functions and variables in relay/channel/baidu/adaptor.go
- Imported "github.com/Laisky/errors/v2" package in controller/channel-billing.go
- Removed unused import packages in [relay/channel/tencent/adaptor.go](http://relay/channel/tencent/adaptor.go ) and relay/channel/palm/adaptor.go
- Updated go.mod and go.sum files with new dependencies and versions
2024-03-12 06:40:23 +00:00
Laisky.Cai
72501cb746
Merge remote-tracking branch 'origin/upstream/main'
2024-03-11 09:32:11 +00:00
JustSong
a90161cf00
chore: drop idx_channels_key on start
2024-03-11 02:24:58 +08:00
JustSong
358920c858
fix: remove index idx_channels_key ( close #644 )
2024-03-10 23:27:22 +08:00
JustSong
796be42487
feat: update ratio config if missing
2024-03-10 19:29:42 +08:00
JustSong
5b50eb94e5
feat: able to send alert message via message pusher ( close #993 )
2024-03-10 19:16:06 +08:00
JustSong
71c61365eb
feat: able to only test disabled channels ( #1090 )
2024-03-10 18:34:57 +08:00
JustSong
6ebc99460e
fix: add user to blacklist when it's banned or deleted, and make deletion soft ( close #473 , close #791 )
2024-03-10 15:56:19 +08:00
JustSong
f05b403ca5
feat: use real system prompt now ( close #1079 )
2024-03-10 14:32:30 +08:00
Laisky.Cai
cb6cb66646
Merge remote-tracking branch 'origin/upstream/main'
2024-03-05 01:02:35 +00:00
JustSong
2df877a352
feat: switch priority when retry ( close #1048 )
2024-03-03 22:14:07 +08:00
Laisky.Cai
ba827b95e3
revert: Rework text model logic and update dependencies
...
- Rewrite model name for relay text
- Simplify logic and move logging statements
- Remove a check that filtered out models by model-mapping
- Remove abilities for the model mapping
- Lower numeric tolerance for test files
2024-03-01 02:14:32 +00:00
Laisky.Cai
c849292621
fix
2024-02-29 09:11:01 +00:00
Laisky.Cai
1a036d977e
Merge branch 'patch/model-mapping'
2024-02-29 09:05:13 +00:00
Laisky.Cai
90a039d325
fix : #1054 Add model mapping to abilities
...
- Update Abilities model to include model mapping key
- Parse model mapping in Channel model and filter models by model mapping in Update function
2024-02-29 09:04:04 +00:00
Laisky.Cai
6ee7281a0a
feat: Map channel model changes to ability mappings
...
Fix: Add model mappings to a channel's abilities
- Add model mappings to a channel's abilities.
- Add model mapping unit tests.
2024-02-29 06:55:55 +00:00
Laisky.Cai
3da0f62055
fix: Improve error handling and logging in channel update abilities
...
- Improve error handling in `UpdateAbilities()` method
- Log model name change request to the mapped model
2024-02-29 06:44:31 +00:00
Laisky.Cai
4625a0b97d
chore: Upgrade dependencies of GoWebProd
...
- Add GoWebProd libraries for UUID version 7, various utilities, xxHash calculation, sets, and more.
- Update various libraries for improved file system monitoring, deques, JSON handling, logging, stubbing, and comparison.
- Log supported models when initializing channel cache and remove duplicates.
2024-02-29 06:29:03 +00:00
Laisky.Cai
a94a3f5b36
Merge remote-tracking branch 'origin/upstream/main'
2024-02-27 01:09:14 +00:00
JustSong
f141a37a9e
fix: fix "error update user quota cache: Error 1040: Too many connections"
2024-02-25 16:58:14 +08:00
Laisky.Cai
29eab22762
Merge remote-tracking branch 'origin/upstream/main'
2024-02-19 07:23:30 +00:00
JustSong
de9a58ca0b
refactor: use config field to save config
2024-02-18 02:22:50 +08:00
Laisky.Cai
10cbe63c0d
Merge remote-tracking branch 'origin/upstream/main'
2024-01-28 13:44:16 +00:00
JustSong
2cd1a78203
chore: update module name
2024-01-28 19:38:58 +08:00
JustSong
ea407f0054
feat: able to set completion ration now ( close #968 )
2024-01-28 16:45:54 +08:00
JustSong
2d760d4a01
refactor: refactor relay part ( #957 )
...
* refactor: refactor relay part
* refactor: refactor config part
2024-01-21 23:21:42 +08:00
JustSong
eed9f5fdf0
refactor: refactor relay part ( #935 )
2024-01-14 19:21:03 +08:00
JustSong
f2c51a494c
feat: able to login via email ( close #921 )
2024-01-14 14:08:39 +08:00
Calcium-Ion
8a4d6f3327
fix: remove useless wrong index ( #916 )
...
* add sqlite busy_timeout=3000
* chore: update impl
* fix: fix JSON tag in Log struct
* fix: 修复高并发下,高额度用户使用低额度令牌没有预扣费而导致令牌大额欠费
* Revert "fix: 修复高并发下,高额度用户使用低额度令牌没有预扣费而导致令牌大额欠费"
This reverts commit f0ffe14437
.
* fix: remove wrong index
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-01-14 13:48:16 +08:00
Laisky.Cai
d37fa80106
Merge remote-tracking branch 'origin/upstream/main'
2024-01-11 09:28:40 +00:00
JustSong
86261cc656
feat: able to change theme
2024-01-07 17:53:05 +08:00
JustSong
8491785c9d
chore: remove useless logging
2024-01-07 17:13:24 +08:00
JustSong
e848a3f7fa
fix: fix error loading stats ( #912 )
2024-01-07 17:10:59 +08:00
Buer
48989d4a0b
feat: add new theme berry ( #860 )
...
* feat: add theme berry
* docs: add development notes
* fix: fix blank page
* chore: update implementation
* fix: fix package.json
* chore: update ui copy
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-01-07 14:20:07 +08:00
Seven Yu
6227eee5bc
fix: fix token validation exception handling #901
...
* fix: fix exception handling
1. add error log for ValidateUserToken
2. update en.json
* chore: update log
---------
Co-authored-by: seven.yu <seven.yu@dji.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-01-07 13:32:39 +08:00
Laisky.Cai
00eca28a76
Merge remote-tracking branch 'origin/upstream/main'
2023-12-27 02:14:34 +00:00
Bryan
40ceb29e54
fix: fix SearchUsers not working if using PostgreSQL ( #778 )
...
* fix SearchUsers
* refactor: using UsingPostgreSQL as condition
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-12-24 16:42:00 +08:00
Laisky.Cai
a889d9dcc9
Merge remote-tracking branch 'origin/upstream/main'
2023-12-18 02:10:13 +00:00
Calcium-Ion
7d6a169669
feat: able to set sqlite busy_timeout ( #818 )
...
* add sqlite busy_timeout=3000
* chore: update impl
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-12-17 19:17:00 +08:00
Laisky.Cai
a75c64f55f
fix: gorm bug for sqlite migrate
...
- Update dependencies in go.mod
- Update specifications for User struct fields in model/user.go
2023-12-12 07:48:41 +00:00
Laisky.Cai
8d8fdaa2af
refactor: Refactor import statements and error handling in multiple files
...
- Fix import statements in main.go
- Improve error handling and logging in model/main.go
2023-12-12 06:34:08 +00:00