mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	Merge pull request #1 from PaRaD1SE98/fix_typo
fix: typo reqestTimeoutId -> requestTimeoutId
This commit is contained in:
		@@ -61,7 +61,7 @@ export class ChatGPTApi implements LLMApi {
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      // make a fetch request
 | 
			
		||||
      const reqestTimeoutId = setTimeout(
 | 
			
		||||
      const requestTimeoutId = setTimeout(
 | 
			
		||||
        () => controller.abort(),
 | 
			
		||||
        REQUEST_TIMEOUT_MS,
 | 
			
		||||
      );
 | 
			
		||||
@@ -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 {
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user