ChatGPT-Next-Web/app/api
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
..
config feat: close #444 use env var to disable gpt-4 2023-05-09 23:20:03 +08:00
openai/[...path] refactor: #1000 #1179 api layer for client-side only mode and local models 2023-05-15 01:33:46 +08:00
auth.ts chore: dynamic server config 2023-05-18 02:15:30 +08:00
common.ts Fix memory leak issue by adding fetch request timeout 2023-05-18 16:55:51 +08:00