Commit Graph

293 Commits

Author SHA1 Message Date
Fred eebc334e02
fix: remove corsFetch 2024-03-14 00:57:54 +08:00
Fred 038fa3b301
fix: add webdav request filter 2024-03-14 00:33:26 +08:00
Fred 9a8497299d
fix: adjust upstash api 2024-03-13 23:58:28 +08:00
Hk-Gosuto 8fbcc653a0 Merge remote-tracking branch 'upstream/main' 2024-03-08 17:35:13 +08:00
Hk-Gosuto 8363fd26c5 fix: #198 2024-02-20 10:30:56 +08:00
Hk-Gosuto 6dd0ad628e fix: #194 2024-02-19 16:29:08 +08:00
Hk-Gosuto 309431a90b build: update langchain 2024-02-19 15:12:27 +08:00
Hk-Gosuto 5e43a4ff2d chore: update pdf browser plugin 2024-02-12 23:10:27 +08:00
Hk-Gosuto c8b7378b70 fix: #185 2024-02-11 10:14:37 +08:00
Hk-Gosuto fee45f7b23 fix: gemini 2024-02-09 13:00:21 +08:00
Hk-Gosuto 64453bb15d fix: #180 2024-02-08 14:27:40 +08:00
Hk-Gosuto 81ef7a8956 Merge remote-tracking branch 'upstream/main' 2024-01-31 11:38:13 +08:00
NieXi f6cdda9029
update google api region (#3934)
Co-authored-by: GH Action - Upstream Sync <action@github.com>
2024-01-27 15:55:44 +08:00
Hk-Gosuto 16e82afaad build: update langchain 2024-01-24 20:54:15 +08:00
Hk-Gosuto 30f9dc756a chore: modify the plug-in return 2024-01-24 20:54:15 +08:00
Yasin 5a7b9abe33
Fix: Routes `/api/cors/[...path]` was not configured to run with the Edge Runtime 2024-01-08 18:43:31 +08:00
Hk-Gosuto 296df592e0 feat: support local storage 2024-01-05 19:29:14 +08:00
Hk-Gosuto d85b95a980 chore: close console 2023-12-31 14:33:49 +08:00
Hk-Gosuto cb096e5772 feat: rewrite WolframAlphaTool 2023-12-31 14:32:47 +08:00
Hk-Gosuto 98b5ace66e fix: gemini authentication error 2023-12-30 11:37:39 +08:00
Hk-Gosuto 2a9b36f626 feat: add wolframAlpha plugin 2023-12-29 19:01:00 +08:00
Hk-Gosuto 4551abdce8 feat: dall-e plugin upgrade 2023-12-29 18:35:14 +08:00
Hk-Gosuto 568ffede5c Merge branch 'feature-openai-tool-call' 2023-12-29 18:23:39 +08:00
Hk-Gosuto cccd518008 fix: tool call returnDirect 2023-12-29 18:19:48 +08:00
Hk-Gosuto 78bc819742 fix: fix gemini stream output 2023-12-29 14:10:51 +08:00
akira-cn d700cbeb9a fix: remove the content-encoding header 2023-12-29 13:52:01 +08:00
akira-cn 3c92e378b5 fix: remove the content-encoding header 2023-12-29 13:52:01 +08:00
Fred Liang 9bfd979b08 chore: update auth value logic (#3630) 2023-12-29 13:51:02 +08:00
Hk-Gosuto 8cdbc231ca feat: support tool call 2023-12-29 09:43:37 +08:00
Hk-Gosuto d050fe636f chore: remove log 2023-12-27 18:09:30 +08:00
Hk-Gosuto 42ee0e0924 chore: modify arxiv api http to https 2023-12-27 12:18:56 +08:00
Hk-Gosuto 445e05c63f fix: fix bug 124 2023-12-27 12:17:39 +08:00
Yifei Zhang 350ddd2af1
Merge pull request #3215 from akira-cn/main
fix: remove the content-encoding header
2023-12-27 01:26:48 +08:00
Hk-Gosuto 1c845c5676 feat: support googleCustomSearchTool 2023-12-26 13:25:14 +08:00
Hk-Gosuto 24de1bb77a fix: support azure 2023-12-25 19:34:30 +08:00
Hk-Gosuto fa2e046285 Merge remote 2023-12-25 12:40:09 +08:00
Hk-Gosuto da29a94714 Merge remote-tracking branch 'upstream/main' 2023-12-25 12:39:24 +08:00
Fred Liang 422d70d928
chore: update auth value logic (#3630) 2023-12-25 10:25:43 +08:00
Fred Liang 19137b79bc
fix: return bearer header when using openai 2023-12-25 09:57:40 +08:00
Fred Liang f5ed1604aa
fix: fix removing bearer header 2023-12-25 05:24:20 +08:00
Fred Liang 5c638251f8
fix: fix using different model 2023-12-25 05:12:21 +08:00
Fred Liang cad461b121
chore: remove console log 2023-12-25 04:09:38 +08:00
Fred Liang 5af68ac545
fix: fix issue https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/3616 2023-12-25 04:07:35 +08:00
H0llyW00dzZ 35471a41c8
Fix & Feat [Auth] Api Key Variable
- [+] fix(auth.ts): fix variable name from serverApiKey to systemApiKey
- [+] feat(auth.ts): add support for Google API key in addition to Azure API key
2023-12-25 00:37:48 +07:00
Fred Liang aea794e522
chore: remove openai log from google api handler 2023-12-24 17:37:07 +08:00
Fred Liang 7d9a2132cb
fix: fix server token fetch policy 2023-12-24 03:57:30 +08:00
Fred Liang 20f2f61349
feat: support set api key from client side 2023-12-24 03:44:13 +08:00
Fred Liang 4169431f2c
fix: fix add api auth 2023-12-24 03:05:23 +08:00
Fred Liang 778e88cb56
chore: resolve conflict 2023-12-24 02:15:30 +08:00
Hk-Gosuto f572df051d chore: code 2023-12-21 19:09:18 +08:00
Hk-Gosuto ee08ab4070 feat: support gemini pro 2023-12-21 19:09:18 +08:00
Hk-Gosuto 4044891f85 feat: support custom dalle model 2023-12-21 12:39:18 +08:00
Hk-Gosuto 789de39b2c feat: support dall-e image not storage 2023-12-14 20:03:53 +08:00
Hk-Gosuto 600a7d2197 feat: images using object service storage 2023-12-10 21:23:40 +08:00
Hk-Gosuto b84da5e120 feat: support custom s3 service 2023-12-10 21:04:24 +08:00
Hk-Gosuto 796abf83ce Merge remote-tracking branch 'upstream/main' 2023-12-06 11:00:40 +08:00
H0llyW00dzZ 8dc8682078
Fix Api Common [Server Side]
- [+] fix(common.ts): improve handling of OpenAI-Organization header
 - Check if serverConfig.openaiOrgId is defined and not an empty string
 - Log the value of openaiOrganizationHeader if present, otherwise log that the header is not present
 - Conditionally delete the OpenAI-Organization header from the response if [Org ID] is undefined or empty (not setup in ENV)
2023-12-04 13:33:23 +07:00
H0llyW00dzZ 36e9c6ac4d
Refactor Api Common [Server Side] [Console Log]
- [+] refactor(common.ts): remove unnecessary console.log for [Org ID] in requestOpenai function
- [+] refactor(common.ts): conditionally delete OpenAI-Organization header from response if [Org ID] is not set up in ENV
2023-12-01 19:49:12 +07:00
Hk-Gosuto a9f2a9d963 fix(73): fix bug 2023-12-01 17:48:11 +08:00
Hk-Gosuto e88685fc98 refactor: refactor code 2023-11-29 13:11:00 +08:00
Hk-Gosuto 293679fa64 refactor: refactor agent api route 2023-11-29 13:11:00 +08:00
Hk-Gosuto 35f5dc52e7 feat: support switch nodejs plugin 2023-11-29 13:11:00 +08:00
Hk-Gosuto a8e19a81ff feat: add pdf browser plugin 2023-11-29 13:11:00 +08:00
H0llyW00dzZ f9d916925e
Fixup Api Common [Server Side] [Console Log]
- [+] fix(common.ts): fix condition to check if serverConfig.openaiOrgId is not undefined
2023-11-25 10:23:16 +07:00
H0llyW00dzZ f9258878db
Fix Api Common [Server Side] [Console Log]
- [+] fix(common.ts): fix console.log statement for [Org ID] to handle undefined value
2023-11-25 10:10:06 +07:00
Hk-Gosuto e173ac76f4
Merge branch 'Yidadaa:main' into main 2023-11-16 22:01:25 -06:00
Hk-Gosuto f718ca030f Merge remote-tracking branch 'upstream/main' 2023-11-16 12:46:09 +08:00
Eric-2369 74eb42c111
config: exclude hkg1 from the deployment regions of the edge function 2023-11-16 11:33:10 +08:00
Yidadaa 9876a1aeca fix: #3275 refuse on server side if hide user api key 2023-11-16 00:53:11 +08:00
Yidadaa a5a1f2e8ad feat: CUSTOM_MODELS support mapper 2023-11-12 00:46:21 +08:00
akira-cn dd6e79922a fix: remove the content-encoding header 2023-11-10 20:42:12 +08:00
akira-cn bf84269520 fix: remove the content-encoding header 2023-11-10 20:38:53 +08:00
Ensteinjun 6b2db97347 fixbug 2023-11-10 15:44:07 +08:00
Yidadaa b7ffca031e feat: close #935 add azure support 2023-11-10 02:43:37 +08:00
Hk-Gosuto c637826ebe Merge remote-tracking branch 'upstream/main' 2023-11-09 12:10:43 +08:00
Yidadaa d93f05f511 feat: close #3187 use CUSTOM_MODELS to control model list 2023-11-09 03:01:29 +08:00
Hk-Gosuto 4eeb21af7d Merge remote-tracking branch 'upstream/main' 2023-11-08 18:43:40 +08:00
安忆 9cb889c34f
docs: up to date 2023-11-08 07:09:52 +08:00
Yidadaa c5ca278253 feat: close #2908 allow to disable parse settings from link 2023-11-08 00:30:02 +08:00
Hk-Gosuto 8272245f7b feat: support dall-e 3 2023-11-07 17:57:53 +08:00
Hk-Gosuto d41b7d3f95
feat: add arxiv plugin (#55) 2023-11-06 18:21:52 +08:00
Yidadaa 5610f423d0 feat: add multi-model support 2023-10-30 02:07:11 +08:00
Hk-Gosuto 516f3f4cb1
support stable diffusion plugin (#49) 2023-10-17 12:52:33 +08:00
Hk-Gosuto 8b769714ce
fix(43): fix dall-e plugin (#46) 2023-10-08 02:53:38 -05:00
hang666 83f5dc48d1
支持直连google\baidu搜索引擎 (#30)
* 支持直连google\baidu搜索引擎

* 删除无用参数
2023-09-22 09:35:38 +08:00
Hk-Gosuto 4aa569d80f fix(24): 移除R2存储文件获取接口的鉴权 2023-09-20 17:54:32 +08:00
Hk-Gosuto 90ce3f1e19
Merge branch 'Yidadaa:main' into main 2023-09-19 10:40:09 +08:00
Yidadaa 59fbadd9eb fixup 2023-09-19 02:21:31 +08:00
Yidadaa adb860b464 fix: #2820 try to fix 520 error code 2023-09-19 02:12:43 +08:00
Hk-Gosuto ccf840b3ca Merge remote-tracking branch 'upstream/main' 2023-09-18 19:07:58 +08:00
Hk-Gosuto 2947274ce6 feat: Cloudflare R2 对象存储支持 2023-09-16 19:01:35 +08:00
Hk-Gosuto 6d8150a1b0 Merge branch 'main' into feat/dalle-plugin 2023-09-16 18:53:08 +08:00
Amor Zara bd69116df2
Update route.ts
Correct typo error and make warning more specific.
2023-09-15 11:21:42 +08:00
Hk-Gosuto 6da890e363 revert: 移除ddg配置代理的功能 2023-09-15 00:01:01 +08:00
Hk-Gosuto e23d50e862 fix bug 2023-09-14 23:45:18 +08:00
Hk-Gosuto e9285ebbef fix bug 2023-09-14 23:26:37 +08:00
Hk-Gosuto 6a0791f0a2 feat: 增加dall-e插件 2023-09-14 23:16:18 +08:00
Hk-Gosuto 38c41f9ed3 Merge remote-tracking branch 'upstream/main' 2023-09-13 12:47:16 +08:00
Yidadaa dc555b2206 fixup 2023-09-13 02:52:28 +08:00
Yidadaa 6f83fbd212 feat: add webdav support 2023-09-13 02:51:02 +08:00
Hk-Gosuto 1e8068436f feat: ddg插件支持单独配置http代理 2023-09-12 13:02:41 +08:00
Hk-Gosuto 67696fa046 feat: 添加维基百科插件 2023-09-09 13:13:26 +08:00
Hk-Gosuto c9c5ab2a9b feat: 支持开关指定内置插件 2023-09-04 21:59:42 +08:00
Hk-Gosuto 00479d5b32 feat: 网络访问更换为WebBrowser插件 2023-08-21 12:51:18 +08:00
Hk-Gosuto 9a8b3f06cd feat: agent支持自定义openaikey 2023-08-18 13:40:04 +08:00
Hk-Gosuto 20366fee35 feat: agent支持baseUrl配置 2023-08-18 12:01:28 +08:00
Hk-Gosuto 76eb2afd06 feat: 支持全局配置插件 2023-08-16 13:39:00 +08:00
Hk-Gosuto 6f38ee9a88
Merge pull request #8 from Hk-Gosuto/dev
支持 ChatSession 级别插件功能开关
2023-08-12 00:56:18 +08:00
Hk-Gosuto fb1b92e9cc feat: 支持 ChatSession 级别插件功能开关 2023-08-12 00:53:15 +08:00
Hk-Gosuto 6b28bcd9b5 feat: 支持session级别插件开关 2023-08-11 17:55:50 +08:00
Hk-Gosuto 1147d63e8e
Merge branch 'Yidadaa:main' into main 2023-08-10 11:48:57 +08:00
Yifei Zhang 0b7de6f7b2
fix: #2594 trim the / 2023-08-10 10:47:06 +08:00
Hk-Gosuto 987598f30d Merge remote-tracking branch 'upstream/main' 2023-08-09 12:27:52 +08:00
Yidadaa b14c5cd89c fix: #2485 one-time-use body 2023-08-08 21:36:37 +08:00
Hk-Gosuto d693d51201 feat: 增加bing搜索插件支持 2023-08-07 12:31:03 +08:00
Hk-Gosuto 6271491399 fix: 修复 vercel 部署接口超时的问题 2023-08-02 12:59:21 +08:00
Hk-Gosuto a5bc735548 fix: 修复问题 2023-07-31 18:40:46 +08:00
Hk-Gosuto 39ee7591a5 chore: 更新引用 2023-07-29 19:09:28 +08:00
Hk-Gosuto 1d5e8a9cbf feat: 支持duckduckgo搜索插件 2023-07-29 19:02:57 +08:00
Hk-Gosuto 58d2024fea feat: agent接口支持鉴权 2023-07-24 12:01:44 +08:00
Hk-Gosuto 2bb421b8bf feat: 使用langchain实现插件功能 2023-07-22 15:38:44 +08:00
Hk-Gosuto 22dd01dc59
Merge branch 'Yidadaa:main' into main 2023-07-16 23:02:53 +08:00
Yidadaa 30473ec41e fix: #2367 do not copy in async callback after sharing to ShareGPT 2023-07-16 16:14:57 +08:00
markshawn2020 1c335a68e0 fixed openai base url if empty 2023-07-14 21:03:32 +08:00
Hk-Gosuto be560a7485
Merge branch 'Yidadaa:main' into main 2023-07-12 11:10:21 +08:00
yuanliang feng a832cfb343
Update common.ts 2023-07-11 15:46:40 +08:00
yuanliang feng 7a0b437626
Update common.ts 2023-07-10 17:26:28 +08:00
Hk-Gosuto 2c69d5c557
Merge branch 'Yidadaa:main' into main 2023-07-10 15:27:47 +08:00
ShengYan, Zhang dd047fd58f fix: typos 2023-07-10 10:09:19 +08:00
Hk-Gosuto c6328095bc fix: tools api 2023-07-06 13:12:25 +08:00
Hk-Gosuto 04d3c1f315 sync upstream code 2023-07-06 00:19:05 +08:00
Yidadaa 4131fccbe0 feat: close #2192 use /list/models to get model ids 2023-07-04 23:16:24 +08:00
Constaline c05de45d99 feat: add "Hide_Balance_Query" environment variable 2023-06-25 20:20:36 +08:00
mushan0x0 9c05d136f5
fix: #2061 RequestInit TypeError 2023-06-20 11:57:31 +08:00
Yidadaa 184a0b9481 fix: #1954 lazy render bugs 2023-06-15 01:34:21 +08:00
Yidadaa 0fb775d71a fix: #1931 try to fix cors issues 2023-06-15 00:28:47 +08:00
Yidadaa 0d4611052e feat: white url list for openai security 2023-06-13 00:39:29 +08:00
Yidadaa 6410aa214e feat: just disable all ngnix buffer 2023-06-08 23:49:06 +08:00
Yidadaa a3a77006ff fixup: #1815 req.body will be broken in edge runtime 2023-06-07 02:24:45 +08:00
Yidadaa 37da759fd5 fix: #1815 refuse to serve when disable gpt4 2023-06-07 01:02:01 +08:00
popcell d533895637 fix: #1746 Can't modify immutable headers. 2023-05-25 17:50:46 +08:00
Yidadaa c2b36cdffa feat: prevent browser to invoke basic auth popup 2023-05-21 00:06:28 +08:00
Yidadaa af497c96ec fix: #1612 infinite loading 2023-05-20 19:58:12 +08:00
Yidadaa 203ac0970d feat: #1640 support free gpt endpoint 2023-05-19 23:53:27 +08:00
Clarence Dan ac79d810d0
Fix memory leak issue by adding fetch request timeout
This commit resolves a memory leak issue that was occurring due to fetch requests hanging indefinitely. A timeout has been introduced to the `requestOpenai` function which ensures that these requests are aborted after a set period of time (currently 10 minutes). Additionally, error handling has been added to catch and log `AbortError` when a fetch request is aborted. This fix significantly improves the stability and reliability of the application by preventing memory leaks related to unresolved fetch requests.
2023-05-18 16:55:51 +08:00
Clarence Dan 2b912c6834
fix: Fix memory leak issue by adding fetch request timeout
This commit resolves a memory leak issue that was occurring due to fetch requests hanging indefinitely. A timeout has been introduced to the `requestOpenai` function which ensures that these requests are aborted after a set period of time (currently 10 minutes). Additionally, error handling has been added to catch and log `AbortError` when a fetch request is aborted. This fix significantly improves the stability and reliability of the application by preventing memory leaks related to unresolved fetch requests.
2023-05-18 16:52:32 +08:00
Yidadaa 3fe521421f chore: dynamic server config 2023-05-18 02:15:30 +08:00
Yidadaa 736c66f46a feat: stop all stale messages 2023-05-18 01:24:36 +08:00
Yidadaa 71cbf86b2c fixup: add more error info 2023-05-16 01:58:58 +08:00
Yidadaa a3de277c43 refactor: #1000 #1179 api layer for client-side only mode and local models 2023-05-15 01:33:46 +08:00