Skip to content

Commit

Permalink
Merge pull request #1 from PaRaD1SE98/fix_typo
Browse files Browse the repository at this point in the history
fix: typo reqestTimeoutId -> requestTimeoutId
  • Loading branch information
PaRaD1SE98 authored May 16, 2023
2 parents 5ba0aef + 06534fa commit 8cde6cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class ChatGPTApi implements LLMApi {
};

// make a fetch request
const reqestTimeoutId = setTimeout(
const requestTimeoutId = setTimeout(
() => controller.abort(),
REQUEST_TIMEOUT_MS,
);
Expand All @@ -78,7 +78,7 @@ export class ChatGPTApi implements LLMApi {
fetchEventSource(chatPath, {
...chatPayload,
async onopen(res) {
clearTimeout(reqestTimeoutId);
clearTimeout(requestTimeoutId);
if (res.status === 401) {
let extraInfo = { error: undefined };
try {
Expand Down Expand Up @@ -119,7 +119,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);
Expand Down

0 comments on commit 8cde6cd

Please sign in to comment.