CaIon
e2a1caba4c
fix: 修复渠道一致性问题
2024-01-12 14:36:15 +08:00
CaIon
febcadb42c
chore: add SafeGoroutine
2024-01-12 13:49:53 +08:00
CaIon
6757166de5
Merge remote-tracking branch 'origin/main'
2024-01-12 13:46:08 +08:00
CaIon
2a9c3ac6af
fix: 修复mj错误返还费用问题
2024-01-12 13:45:52 +08:00
GAI Group
6aadcf0c78
fix: the Redis problem in the CacheGetUsername function
...
fix: the Redis problem in the CacheGetUsername function
2024-01-12 13:15:43 +08:00
CaIon
ad85792818
fix: user group size
2024-01-11 22:06:30 +08:00
CaIon
f07b9f8ab2
chore: cache username
2024-01-11 18:40:44 +08:00
CaIon
6a24e8953f
feat: able to fix channels
2024-01-10 13:23:43 +08:00
CaIon
1618a8c9fc
perf: 优化数据看板性能
2024-01-09 16:20:04 +08:00
CaIon
6ed365c267
fix: 修复数据看板筛选用户的时候不能指定时间的问题
2024-01-09 12:11:09 +08:00
CaIon
95e84f2bb1
perf: 优化数据看板性能和显示效果
2024-01-08 18:49:10 +08:00
CaIon
1244963e81
feat: 可设置令牌能调用的模型
2024-01-08 16:25:17 +08:00
CaIon
8f36a995ef
perf: 美化数据看板
2024-01-08 11:32:27 +08:00
CaIon
daf0be4915
fix: fix JSON tag in Log struct
2024-01-08 11:25:22 +08:00
CaIon
f3124e7252
fix: 减少username和model_name字段长度为64
2024-01-08 10:11:36 +08:00
CaIon
ebedf2cb7e
fix: 减少group和model字段长度为64
2024-01-08 10:08:20 +08:00
CaIon
a5e0f86c65
fix: 索引长度
2024-01-07 22:16:20 +08:00
CaIon
2a995a5da2
fix: 索引名称长度
2024-01-07 22:07:17 +08:00
CaIon
bba6174745
fix: fix gemini panic
2024-01-07 21:27:28 +08:00
CaIon
1c2bba8979
feat: 完善数据看板选择时间区间
2024-01-07 19:47:35 +08:00
CaIon
ce05e7dd86
fix: 优化数据看板更新逻辑
2024-01-07 18:33:41 +08:00
CaIon
bf8794d257
feat: 新增数据看板
2024-01-07 18:31:14 +08:00
Xyfacai
5c747dfee2
optimize: MJ 部分调整、优化
...
MJ
增加simple-change、list接口,
变换和重试操作区别出来,价格与绘图一样
优化图片返回
2024-01-01 22:46:05 +08:00
CaIon
7e4fe14871
更新用户时刷新缓存数据
2023-12-29 00:00:23 +08:00
CaIon
bdd611fd33
feat: 加入渠道加权随机功能
2023-12-27 19:00:47 +08:00
CaIon
c09f3b9282
enable parseTime=true
2023-12-27 16:47:32 +08:00
CaIon
e8bcf60f0a
修复不能删除注销用户的问题
2023-12-27 16:46:18 +08:00
CaIon
6ad2544415
enable mysql parseTime
2023-12-27 15:33:35 +08:00
CaIon
7cd1261a81
Revert "fix delete user"
...
This reverts commit 07fe5a02
2023-12-27 15:31:28 +08:00
CaIon
45ed973f1c
fix delete user
2023-12-27 15:15:07 +08:00
CaIon
07fe5a02af
fix delete user
2023-12-27 14:36:19 +08:00
CaIon
ad6842da7f
用户注销后禁止再次注册
2023-12-27 00:19:11 +08:00
Xyfacai
fd4ef086dc
fix: 优化 mj 获取进度
2023-12-23 23:14:58 +08:00
CaIon
3475643257
支持设置模型按次计费
2023-12-21 20:14:04 +08:00
CaIon
f5a36a05e5
log输出更多有效信息
2023-12-20 20:53:36 +08:00
CaIon
0226d94ea6
修改docker-compose.yml
2023-12-18 23:46:04 +08:00
CaIon
e1da1e31d5
添加批量删除渠道功能
2023-12-14 16:35:03 +08:00
CaIon
44465a398b
support gpts
2023-12-11 19:50:43 +08:00
CaIon
79d7758617
充值改为保留两位小数
2023-12-09 22:56:24 +08:00
CaIon
aa07ada0f4
fix pgsql
2023-12-08 13:15:59 +08:00
CaIon
3ee4136256
消费日志添加用户调用前余额
2023-12-07 16:58:24 +08:00
CaIon
7dc8b0ea93
更新渠道管理
2023-12-05 18:15:40 +08:00
CaIon
3121afd2e0
修复令牌添加、搜索bug
2023-11-25 17:30:36 +08:00
CaIon
69f2c41853
fix bug
2023-11-23 19:01:14 +08:00
Calcium-Ion
2ee3dbbc18
Merge pull request #14 from luxlzz6/main
...
绘画列表显示统一了风格 添加了渠道
2023-11-23 18:55:18 +08:00
luxl
3e89112b1c
绘图列表更新
2023-11-23 18:18:03 +08:00
AIASS Group
15d3e9819d
fix the issue of model repetition
2023-11-23 15:36:07 +08:00
CaIon
560753c61f
修复可用模型显示已禁用模型
2023-11-22 23:02:43 +08:00
CaIon
f18f585fc8
修复可用model重复显示bug
2023-11-21 16:58:31 +08:00
CaIon
fd57a1df08
完善个人中心
2023-11-21 16:35:51 +08:00
CaIon
c75a92f6a4
Merge branch 'main' into latest
2023-11-15 21:07:37 +08:00
CaIon
16ad764f9b
try to fix email
2023-11-15 18:27:42 +08:00
luxl
08b8b7b980
Update token.go
2023-11-14 16:41:19 +08:00
CaIon
3202ca9f3e
修复余额不足邮件提醒bug
2023-11-12 18:51:26 +08:00
CaIon
46930bc890
完全移除近似估算token功能
2023-11-11 01:55:19 +08:00
CaIon
6ceaf9f6a5
fix log bug
2023-11-10 01:59:16 +08:00
CaIon
e3fca11f99
修复令牌bug
2023-11-10 00:46:17 +08:00
CaIon
44d9eb9d05
完善兑换码界面
2023-11-10 00:10:41 +08:00
CaIon
3ff4210fc4
适配dall-e-3
2023-11-09 17:08:32 +08:00
Calcium-Ion
7688e9f9dd
Merge branch 'songquanpeng:main' into main
2023-10-30 16:12:09 +08:00
Bryan
a398f35968
fix: fix postgresql support ( #606 )
...
* fix postgresql support
fixes #517
* fix: fix pg support
* chore: delete useless code
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-10-22 18:38:29 +08:00
CaIon
fc2ef52366
Merge remote-tracking branch 'origin/main'
...
# Conflicts:
# README.md
# go.mod
# go.sum
# model/log.go
# web/src/App.js
# web/src/components/ChannelsTable.js
2023-10-16 17:31:26 +08:00
JustSong
824444244b
feat: able to delete all disabled channels
2023-10-14 17:25:48 +08:00
JustSong
f073592d39
fix: fix request count not updated correctly when using batch update
2023-10-14 15:04:52 +08:00
CaIon
921f1d65ad
fix bug
2023-10-11 21:47:59 +08:00
CaIon
a4e269262b
feat: 新增充值分组倍率设置
2023-10-11 14:58:09 +08:00
JustSong
8d34b7a77e
feat: able to delete all manually disabled channels ( close #539 )
2023-10-02 13:06:27 +08:00
JustSong
cbd62011b8
chore: add database migration prompt
2023-10-02 12:13:30 +08:00
JustSong
4701897e2e
chore: sync database indices with pro version
2023-10-02 12:11:02 +08:00
JustSong
53b2cace0b
chore: sync model schema
2023-09-29 18:13:57 +08:00
JustSong
f9b748c2ca
chore: add MEMORY_CACHE_ENABLED env variable
2023-09-29 11:38:27 +08:00
CaIon
d429992be2
feat: 优先优先级排序渠道
2023-09-27 01:17:43 +08:00
CaIon
1bb65fa0dd
feat: 优先用优先级排序渠道
2023-09-27 01:03:53 +08:00
CaIon
80271b33ba
feat: 渠道新可选是否自动禁用功能
2023-09-25 18:44:10 +08:00
CaIon
3d55548c92
Merge remote-tracking branch 'origin/main'
...
# Conflicts:
# model/log.go
2023-09-24 12:34:29 +08:00
igophper
8651451e53
fix: sum null to 0 ( #541 )
...
Co-authored-by: igophper <admin@jialilgu.cn>
2023-09-19 22:39:54 +08:00
Calcium-Ion
f82fde9d8a
Merge branch 'songquanpeng:main' into main
2023-09-18 23:41:12 +08:00
JustSong
1c5bb97a42
fix: fix gorm expression
...
Co-authored-by: 初音控灬 <xyfacai@gmail.com>
2023-09-18 23:11:37 +08:00
JustSong
de868e4e4e
fix: fix gorm expression
...
Co-authored-by: 初音控灬 <xyfacai@gmail.com>
2023-09-18 23:07:59 +08:00
Calcium-Ion
26f9d25860
Merge branch 'songquanpeng:main' into main
2023-09-18 22:52:10 +08:00
JustSong
1d258cc898
fix: add default value for base url
2023-09-18 22:49:05 +08:00
JustSong
37e09d764c
fix: fix random selection is not working when directly using database
2023-09-18 22:39:10 +08:00
JustSong
159b9e3369
fix: fix unable to set zero value for base url & model mapping
2023-09-18 22:07:17 +08:00
JustSong
a5647b1ea7
fix: fix priority not updated & random choice not working
2023-09-18 21:43:45 +08:00
CaIon
985e26fd1b
Merge remote-tracking branch 'origin/main'
...
# Conflicts:
# controller/log.go
# controller/relay-audio.go
# controller/relay-image.go
# controller/relay-text.go
# controller/relay.go
# middleware/distributor.go
# model/log.go
# web/src/components/OperationSetting.js
2023-09-17 20:59:12 +08:00
Xyfacai
ecf8a6d875
feat: supprt channel priority now & record channel id in log ( #484 )
...
* feat: 支持设置渠道优先级 & 日志中显示使用的渠道ID
* fix: 设置渠道优先级未更新 ability
* chore: update implementation
---------
Co-authored-by: Xiangyuan Liu <xiangyuan.liu@ui.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
2023-09-17 19:18:16 +08:00
JustSong
328aa68255
feat: able to delete logs now ( close #486 )
2023-09-17 17:09:56 +08:00
JustSong
42451d9d02
refactor: update logging related logic
2023-09-17 15:39:46 +08:00
CaIon
cc09dd4f9d
feat: 渠道支持指定组织
2023-09-15 17:59:01 +08:00
CaIon
d9deda18c1
feat: 改为转发的方式获取midjourney图片
2023-09-12 03:57:03 +08:00
CaIon
4a836a4cb6
feat: 删除无用功能
2023-09-10 01:13:12 +08:00
CaIon
01a66ff33c
修复充值bug
2023-09-09 05:04:49 +08:00
CaIon
9c08d78349
Merge remote-tracking branch 'origin/main'
...
# Conflicts:
# controller/relay.go
# main.go
# middleware/distributor.go
2023-09-09 03:15:55 +08:00
CaIon
9ab4f7a271
移除不必要的功能
2023-09-09 03:11:42 +08:00
JustSong
621eb91b46
chore: pass through error out
2023-09-03 21:31:58 +08:00
JustSong
c3dc315e75
feat: add batch update support ( close #414 )
2023-09-03 14:58:20 +08:00
CaIon
c0f0201f5f
Merge remote-tracking branch 'origin/main'
...
# Conflicts:
# controller/relay-text.go
# go.mod
# web/src/components/PersonalSetting.js
# web/src/components/TokensTable.js
# web/src/pages/Home/index.js
2023-08-25 00:51:02 +08:00
CaIon
3b0f1ae978
修改stat接口返回值
2023-08-25 00:40:11 +08:00
JustSong
86c2627c24
fix: update cache immediately after cache get
...
Co-authored-by: chikasaki <1347283135@qq.com>
Co-authored-by: Cruel <157922018@qq.com>
2023-08-16 23:40:50 +08:00
CaIon
8f2119e410
add epay
2023-08-14 22:16:32 +08:00
JustSong
cac61b9f66
Revert "fix: add lock when update quota ( close #399 )"
...
This reverts commit eae9b6e607
.
2023-08-13 00:51:48 +08:00
igophper
4ef5e2020c
fix: fix baidu's embedding api ( #398 )
...
* fix:judge baidu embeddings input type
* chore: add back update all channels balance
* chore: update default configuration for sql connection
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-08-13 00:45:04 +08:00
JustSong
e0b4f96b5b
feat: support PostgreSQL now
2023-08-12 19:20:12 +08:00
JustSong
eae9b6e607
fix: add lock when update quota ( close #399 )
2023-08-12 18:25:18 +08:00
JustSong
7bddc73b96
perf: flush response after response handled ( close #364 )
2023-08-12 18:10:15 +08:00
JustSong
466005de07
fix: set connection limits for database
2023-08-12 10:05:25 +08:00
ckt
3fca6ff534
feat: support email domain whitelist ( #337 )
...
* feat: support email domain restriction
* fix(SMTPToken): disable password auto complete
* chore: update implementation
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-07-30 12:44:41 +08:00
JustSong
889af8b2db
fix: fix redemption can be used multiple times in some cases
2023-07-23 19:34:23 +08:00
JustSong
4eea096654
chore: do not hardcode cache time ( close #302 )
2023-07-23 19:26:37 +08:00
JustSong
35cfebee12
feat: retry on failed ( close #112 )
2023-07-15 19:06:51 +08:00
JustSong
d17bdc40a7
fix: use transaction to protect redeem process
2023-07-07 21:26:45 +08:00
JustSong
701aaba191
feat: able to approximate token ( close #207 )
2023-07-04 19:54:13 +08:00
JustSong
0cea9e6a6f
fix: fix channel search is not working with MySQL
2023-06-29 21:46:13 +08:00
JustSong
aabc546691
fix: fix the wrong message when channel is deleted
2023-06-29 11:27:34 +08:00
JustSong
737672fb0b
fix: update cached user quota after post-consuming ( close #204 )
2023-06-27 19:22:58 +08:00
JustSong
0941e294bf
feat: support model remap now
2023-06-27 13:42:45 +08:00
mrhaoji
f0dc7f3f06
fix: InitChannelCache does not filter disabled channels ( #201 )
...
* chore: Show the HTTP status code in the test_time script to determine the success or failure of the request.
* fix: InitChannelCache does not filter disabled channels
* chore: do not hardcode
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-06-25 23:14:15 +08:00
JustSong
3ce982d8ee
feat: able to query token with admin user
2023-06-24 19:13:33 +08:00
JustSong
cccf5e4a07
feat: able to query logs now ( close #144 )
2023-06-24 15:28:11 +08:00
JustSong
7edc2b5376
feat: able to display token billing stat via billing api ( close #186 )
2023-06-23 20:14:53 +08:00
JustSong
ad1049b0cf
feat: support search channels by key ( close #185 )
2023-06-22 21:19:43 +08:00
JustSong
00151a0124
chore: format logs
2023-06-22 10:59:01 +08:00
JustSong
b86de464b5
chore: print more logs
2023-06-22 01:12:28 +08:00
JustSong
567916bd80
fix: only master node can migrate database
2023-06-22 00:52:27 +08:00
JustSong
6d961064d2
feat: do not access database before response return ( close #158 )
2023-06-21 17:26:26 +08:00
JustSong
ba54c71948
feat: select channel without database ( #158 )
2023-06-21 17:04:18 +08:00
JustSong
dc7bb78c74
chore: update api message
2023-06-21 15:55:00 +08:00
JustSong
853a288052
chore: update api message
2023-06-21 15:54:06 +08:00
JustSong
14b85318a6
fix: fix crash when Redis is enabled
2023-06-20 20:56:35 +08:00
JustSong
b179c2f208
feat: able to display quota in dollar
2023-06-20 20:09:17 +08:00
JustSong
3d76a974d1
feat: use cache to avoid database access ( #158 )
2023-06-20 19:09:49 +08:00
JustSong
5c18c559c3
chore: make the user unable to search token by id
2023-06-19 10:04:38 +08:00
JustSong
d97640374c
feat: able to add chat page link now ( close #70 )
2023-06-17 23:51:56 +08:00
JustSong
c5837c3bb7
feat: support aff now ( close #75 )
2023-06-17 18:12:58 +08:00
JustSong
0cdab80a6e
feat: record channel's used quota ( close #137 )
2023-06-16 16:02:00 +08:00
JustSong
760183a970
feat: record used quota & request count ( close #102 , #165 )
2023-06-16 15:20:06 +08:00
JustSong
593e1926e9
feat: able to disable quota consumption recording ( close #156 )
2023-06-15 16:32:16 +08:00
JustSong
7f9577a386
feat: now one channel can belong to multiple groups ( close #153 )
2023-06-14 12:14:08 +08:00
JustSong
596446dba4
feat: able to set group ratio now ( close #62 , close #142 )
2023-06-11 11:08:16 +08:00
JustSong
64db39320a
feat: now able to check all user's log
2023-06-10 20:40:23 +08:00
JustSong
d29c273073
chore: add more log types
2023-06-10 16:31:40 +08:00
JustSong
74f508e847
feat: now user can check its topup & consume history ( close #78 , close #95 )
2023-06-10 16:04:04 +08:00
JustSong
813bf0bd66
refactor: enable model configuration on default group ( close #143 )
2023-06-09 18:05:51 +08:00
JustSong
45e9fd66e7
feat: able to check topup history & consumption history ( #78 , #95 )
2023-06-09 16:59:00 +08:00
JustSong
e0d0674f81
fix: fix redemption code's quota not updated
2023-06-08 15:19:55 +08:00
JustSong
2c53424db8
feat: able to manage group now
2023-06-08 09:26:54 +08:00
JustSong
2ad22e1425
feat: support group now ( close #17 , close #72 , close #85 , close #104 , close #136 )
...
Co-authored-by: quzard <1191890118@qq.com>
2023-06-07 23:26:00 +08:00
JustSong
2847a08852
feat: the format of key is now constant with that of OpenAI
2023-06-03 10:53:25 +08:00
JustSong
171b818504
feat: support channel remain quota query ( close #79 )
2023-05-21 16:09:54 +08:00
JustSong
a3a1b612b0
chore: set initial quota for root user
2023-05-21 10:05:34 +08:00
JustSong
61e682ca47
feat: able to manage user's quota now
2023-05-21 10:01:02 +08:00
JustSong
2d39a135f2
feat: now slave server can sync options with master server ( close #88 )
2023-05-18 12:48:20 +08:00
JustSong
73d5e0f283
feat: support dummy sk- prefix for token ( #82 )
2023-05-17 17:04:06 +08:00
JustSong
4d6172a242
feat: able to set pre consumed quota now
2023-05-16 13:57:01 +08:00
JustSong
8afdc56b11
fix: fix quota not consuming
2023-05-16 13:29:22 +08:00
JustSong
01abed0a30
refactor: bind quota to account instead of token ( close #64 , #31 )
2023-05-16 11:26:09 +08:00
JustSong
c48327ff91
fix: fix option update logic not working properly
2023-05-16 10:04:39 +08:00
JustSong
a1f61384c5
feat: automatically disable channel when error occurred ( #59 )
2023-05-15 17:34:09 +08:00
JustSong
d267211ee7
feat: able to test all enabled channels ( #59 )
2023-05-15 12:36:55 +08:00
JustSong
225176aae9
feat: save response time & test time ( #59 )
2023-05-15 11:35:38 +08:00
JustSong
926951ee03
feat: able to customize system name & logo now
2023-05-14 19:29:02 +08:00
JustSong
e123c66bc7
fix: fix SMTPFrom not updated in some cases ( close #34 )
2023-05-13 22:04:36 +08:00
JustSong
d84c2f5c70
feat: able to customize home page now ( #24 )
2023-05-13 21:27:49 +08:00
JustSong
f5f4e6fbc6
feat: able to configure smtp from now ( close #34 )
2023-05-13 18:33:41 +08:00
JustSong
dc4a6cb711
feat: support batch creation of channels ( close #58 )
2023-05-13 17:08:13 +08:00
JustSong
83e86b9f8a
feat: support specific default api version now ( #57 )
2023-05-13 12:53:57 +08:00
JustSong
fd19d7d246
fix: handle errors when update option map
2023-05-13 10:30:55 +08:00
JustSong
5c694a1503
feat: now supports custom smtp port
2023-05-12 11:44:38 +08:00
JustSong
d9db16e999
feat: able to configure ratio for more models now ( close #53 )
2023-05-11 20:59:35 +08:00
JustSong
241ade2fae
fix: delete a token with a negative quota will now update the account's quota correctly ( close #51 )
2023-05-11 20:05:49 +08:00
JustSong
331177d97e
fix: return quota to user when delete token ( close #37 )
2023-05-04 10:20:39 +08:00
JustSong
d93cb8f645
feat: able to configure ratio for different models ( close #26 )
2023-04-28 19:16:37 +08:00
JustSong
480e789cd8
feat: support configuring ratio when estimating token number in stream mode
2023-04-28 17:25:05 +08:00
JustSong
053bb85a1c
feat: now use token as the unit of quota ( close #33 )
2023-04-28 16:58:55 +08:00
JustSong
601fa5cea8
refactor: use quota instead of times
2023-04-28 14:57:20 +08:00
JustSong
f97c2b4c22
feat: able to set top up link now
2023-04-27 16:32:21 +08:00
JustSong
54b1e4adef
fix: check user status when validating token ( #23 )
2023-04-27 15:05:33 +08:00
JustSong
195e94a75d
fix: fix MySQL syntax error ( #54 )
2023-04-27 11:10:10 +08:00
JustSong
5bfc224669
fix: specify type for token ( close #23 )
2023-04-27 09:32:20 +08:00
JustSong
b9cc5dfa3f
feat: able to set initial quota for new user ( close #22 )
2023-04-26 21:40:56 +08:00
JustSong
8c305dc1bc
feat: able to manage system vai access token ( close #12 )
2023-04-26 20:54:39 +08:00
JustSong
9e2f2383b9
feat: now user can top up via redemption code ( close #9 )
2023-04-26 17:02:26 +08:00
JustSong
4f8cbd643d
fix: prevent common user from specifying channel id ( #12 )
2023-04-26 14:49:27 +08:00
JustSong
109736cc05
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
01c1b906b5
fix: update error message to make it more clear ( #13 )
2023-04-25 15:13:25 +08:00
JustSong
918ba60802
feat: able to set the token's expiration time and number of uses
2023-04-24 20:52:40 +08:00
JustSong
b3be4d8f85
Support custom channel now
2023-04-23 20:35:49 +08:00
JustSong
852af57c03
Relay done but not working
2023-04-23 18:24:11 +08:00
JustSong
9fc375c604
Able to manage channels now
2023-04-23 15:42:23 +08:00
JustSong
63da6dc6a0
Able to manage token now
2023-04-23 12:43:10 +08:00
JustSong
b908229429
Token API done without verification
2023-04-23 11:31:00 +08:00
JustSong
6164829239
Channel API done without verification
2023-04-22 22:02:59 +08:00
JustSong
af96007025
Remove useless page
2023-04-22 21:41:16 +08:00
JustSong
539eac217f
Rename to One API
2023-04-22 21:14:09 +08:00
JustSong
ab1f8a2bf4
Initial commit
2023-04-22 20:39:27 +08:00