Commit Graph

26 Commits

Author SHA1 Message Date
ガオガオ
6ac26b7d4a feat:修复apikey使用额度接口缓存问题和修复setting页面针对该接口频繁调用的问题
1.为了解决缓存问题,更新了调用apikey使用额度接口的方法。由于nextjs的fetch默认会缓存同样参数的请求,需要针对fetch加入cache: 'no-store' 的参数修复以避免这一现象。(https://beta.nextjs.org/docs/data-fetching/fetching#dynamic-data-fetching)
2.为了提升用户体验,引入了usageStore,该存储库能够在有数据的情况下,优先使用缓存数据来加载apikey使用额度的信息。只有当重新检查的按钮被点击时,才会再次调用apikey使用额度接口更新usageStore数据,并且在页面上显示最新的更新数据。通过实现这种操作,我们能够避免在进入setting页面时频繁地调用apikey使用额度接口,从而进一步提升响应速度和用户体验。
2023-04-13 01:50:25 +08:00
peanut996
a1c709bb58 [refactor] rename ChatResponse. 2023-04-11 12:06:12 +08:00
Yidadaa
d6e6dd09f0 feat: dynamic config 2023-04-11 02:54:31 +08:00
Yidadaa
9b61cb1335 refactor: build/runtime/client configs 2023-04-11 01:21:34 +08:00
Yidadaa
7aee53ea05 fix: #507 break cjk chars in stream mode 2023-04-10 23:13:20 +08:00
leedom
b8a605f07d merge 2023-04-07 07:18:53 +08:00
Yifei Zhang
6823839f4b
fixup 2023-04-06 17:28:09 +08:00
Yidadaa
8e560d2b2e fix: #410 can not stop response 2023-04-06 03:19:33 +08:00
Yifei Zhang
b44caeeefb fix: #289 #367 #353 #369 provide more error message info 2023-04-02 19:14:53 +00:00
AprilNEA
0a60a87c9f
Merge branch 'main' into reset
# Conflicts:
#	app/components/settings.tsx
2023-04-02 13:45:34 +08:00
Jun Wu
83cea2adb8 api: set Content-Type to json
This avoids issues in browsers like WeChat where the encoding is
incorrect and the summary feature does not work if it contains
zh-CN characters.
2023-04-01 03:37:09 -07:00
Yifei Zhang
447dec9444 feat: close #2 add check account balance 2023-03-29 17:45:26 +00:00
iSource
eb72c83b7e fix: docker access code setting missing 2023-03-28 17:55:03 +08:00
伏晓
fb06fb8c38 fix: resolve hydration error 2023-03-27 18:22:55 +08:00
Yifei Zhang
df66eef919 feat: support using user api key 2023-03-26 11:58:25 +00:00
Yifei Zhang
2c899cf00e feat: #2 add access control by
access code
2023-03-26 06:53:40 +00:00
Yifei Zhang
9398b34b5c feat: optimize loading screen 2023-03-19 14:13:00 +00:00
Yifei Zhang
bab470d000 feat: add export to .md button 2023-03-15 17:24:03 +00:00
Yidadaa
1161adaa9f feat: update payload config 2023-03-11 22:43:15 +08:00
Yidadaa
49fc75235a feat: add log 2023-03-11 22:35:38 +08:00
Yidadaa
74dd6194d8 feat: add stream support 2023-03-11 20:54:24 +08:00
Yidadaa
b17a6a7f61 feat: update dev config 2023-03-11 02:53:34 +08:00
Yidadaa
144eb68414 feat: prod/dev env settings 2023-03-11 02:47:29 +08:00
Yidadaa
2c9baa4e2c feat: finish basic functions 2023-03-11 02:25:33 +08:00
Yidadaa
d49b2aa2c3 feat: add basic ui 2023-03-10 01:01:40 +08:00
Yidadaa
0decdb3e43 Initial commit from Create Next App 2023-03-07 23:23:54 +08:00