From 06534fa0aee6ce92ea8fefb26ecf3dc4dec2d3e0 Mon Sep 17 00:00:00 2001 From: PaRaD1SE98 Date: Tue, 16 May 2023 09:59:30 +0900 Subject: [PATCH] fix: typo reqestTimeoutId -> requestTimeoutId --- app/client/platforms/openai.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index cc1ecb919..788861c1b 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -60,7 +60,7 @@ export class ChatGPTApi implements LLMApi { }; // make a fetch request - const reqestTimeoutId = setTimeout( + const requestTimeoutId = setTimeout( () => controller.abort(), REQUEST_TIMEOUT_MS, ); @@ -75,7 +75,7 @@ export class ChatGPTApi implements LLMApi { fetchEventSource(chatPath, { ...chatPayload, async onopen(res) { - clearTimeout(reqestTimeoutId); + clearTimeout(requestTimeoutId); if (res.status === 401) { responseText += "\n\n" + Locale.Error.Unauthorized; return finish(); @@ -106,7 +106,7 @@ export class ChatGPTApi implements LLMApi { }); } else { const res = await fetch(chatPath, chatPayload); - clearTimeout(reqestTimeoutId); + clearTimeout(requestTimeoutId); const resJson = await res.json(); const message = this.extractMessage(resJson);