Commit Graph

249 Commits

Author SHA1 Message Date
Benny
51cb5bbcb6 fix: empty completion issue caused by bad status code from upstream channel (#422) 2023-08-27 17:46:00 +08:00
Benny
3ca910917c fix: empty completion issue caused by bad status code from upstream channel (#422) 2023-08-21 10:30:11 +08:00
glzjin
e556a23b19 fix: fix baidu & ali's quota calculation (#444)
* 修复阿里计费问题

* 修复百度计费问题
2023-08-21 10:30:07 +08:00
Benny
e4aa859f91 fix: claude model ratio (#449)
* fix: Claude model ratio

* chore: update implementation

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-08-21 10:29:57 +08:00
ckt1031
d5dfacd8a6 fix: json issue 2023-08-20 01:24:59 +08:00
JustSong
9db93b9d43 fix: update cache immediately after cache get
Co-authored-by: chikasaki <1347283135@qq.com>
Co-authored-by: Cruel <157922018@qq.com>
2023-08-19 13:33:38 +08:00
ckt1031
8195619037 Merge remote-tracking branch 'upstream/main' into refactor-main 2023-08-13 17:55:21 +08:00
JustSong
3da12e99d9 chore: update variable name 2023-08-13 00:50:26 +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
igophper
af20063a8d
feat: able to refresh baidu access token automatically (#400, close #401)
* feat:baidu channel support apiKey and secretKey

添加百度文心渠道时支持填写secretKey|apiKey或者accessToken,支持自动刷新accessToken

* fix

* fix

* fix

* chore: update implementation

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
2023-08-12 23:41:44 +08:00
igophper
ca512f6a38
refactor: add set event stream headers func (#402)
封装流式传输响应头的设置
2023-08-12 21:55:18 +08:00
JustSong
0e9ff8825e perf: use a goroutine to handle quota post consumption (#364) 2023-08-12 19:36:31 +08:00
JustSong
7bddc73b96 perf: flush response after response handled (close #364) 2023-08-12 18:10:15 +08:00
JustSong
2a527ee436 fix: fix token name too long 2023-08-12 16:58:29 +08:00
JustSong
1e16ef3e0d chore: resolve conflicts 2023-08-12 11:08:52 +08:00
igophper
476a46ad7e
fix: fix finish_reason fileld not fully compatible with OpenAI (close #372, #373)
* optimize:unify finish_reason field

* refactor: use a global stop finish reason

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-08-12 11:04:53 +08:00
Yolo°
c58f710227
feat: improve frontend (#387)
* fork

* fork

* chore: update style

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-08-12 10:49:30 +08:00
JustSong
150d068e9f chore: update prompt 2023-08-12 10:20:54 +08:00
ckt1031
a88408943c fix: remove unsued file 2023-08-11 23:35:28 +08:00
glzjin
08b141beba fix: update tiktoken-go's version to fix resource consumption problem (#392, close #161) 2023-08-11 23:28:51 +08:00
JustSong
0f8cdf1e7a fix: update no route handler 2023-08-11 23:28:31 +08:00
JustSong
3b36608bbd fix: update no route handler 2023-08-11 19:53:01 +08:00
ckt
5826ffa66c
Merge branch 'songquanpeng:main' into refactor-main 2023-08-07 09:26:22 +08:00
JustSong
d96cf2e84d fix: fix stream mode determine related logic (close #360) 2023-08-06 18:09:00 +08:00
glzjin
446337c329
fix: calculate usage if not given in non-stream mode (#352) 2023-08-06 17:40:31 +08:00
glzjin
2d49ca6a07
fix: fix SparkDesk not billed (#344) 2023-08-06 13:24:49 +08:00
ckt
a9fc392d70
Merge branch 'songquanpeng:main' into refactor-main 2023-08-03 14:56:27 +08:00
glzjin
c2c455c980
fix: fix zhipu streaming (#349)
* Fix #348

* chore: update implementation

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-08-01 23:51:28 +08:00
ckt1031
b66f0ef15a fix: log error channel 2023-07-31 18:34:50 +08:00
ckt1031
fd5b3d11a6 fix: error status code nil 2023-07-31 18:32:09 +08:00
ckt1031
0305444c8e Merge branch 'support-postgres-sql' into refactor-main 2023-07-31 18:08:23 +08:00
JustSong
b0218c184e fix: fix sse not ending properly in some case 2023-07-31 18:05:56 +08:00
ckt
f49aca8177 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-31 18:05:56 +08:00
JustSong
2663fbc51a fix: ignore data if not have proper prefix 2023-07-31 18:05:56 +08:00
JustSong
003bbf1b95 fix: prompt user that channel test is unavailable 2023-07-31 18:05:56 +08:00
JustSong
fdddf3caf6 fix: close connection when response ended 2023-07-31 18:05:56 +08:00
JustSong
1190c4b98c refactor: update billing related code 2023-07-31 18:05:56 +08:00
JustSong
0633b3f1d0 chore: update prompt for xunfei 2023-07-31 18:05:56 +08:00
JustSong
72235ee4d9 feat: support xunfei's llm (close #206) 2023-07-31 18:05:56 +08:00
JustSong
bc79273353 fix: fix model mapping cannot be deleted 2023-07-31 18:05:46 +08:00
JustSong
41e6c52878 feat: support baidu's embedding model (close #324) 2023-07-31 18:05:45 +08:00
JustSong
b8903d822d feat: support ali's llm (close #326) 2023-07-31 18:05:45 +08:00
ckt
c14dc8bac0
Merge branch 'songquanpeng:main' into refactor-main 2023-07-30 22:43:02 +08:00
JustSong
c9d2e42a9e fix: fix sse not ending properly in some case 2023-07-30 22:20:42 +08:00
ckt1031
167cb35637 Merge remote-tracking branch 'upstream/main' into refactor-main 2023-07-30 18:28:10 +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
8cbbeb784f fix: ignore data if not have proper prefix 2023-07-30 12:03:06 +08:00
ckt1031
8db2c0173b Merge remote-tracking branch 'upstream/main' into refactor-main 2023-07-30 00:06:16 +08:00
JustSong
ec88c0c240 fix: prompt user that channel test is unavailable 2023-07-29 23:54:09 +08:00
JustSong
065147b440 fix: close connection when response ended 2023-07-29 23:52:18 +08:00