Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Response (Forefront gives Stream Respnse) #4

Closed
taynotfound opened this issue May 6, 2023 · 14 comments
Closed

Bad Response (Forefront gives Stream Respnse) #4

taynotfound opened this issue May 6, 2023 · 14 comments

Comments

@taynotfound
Copy link

https://tay.needs.rest/notepad_RIBQXT2O6v.png
https://tay.needs.rest/Code_Z6Tt7c4M0W.png

@taynotfound
Copy link
Author

after i hardcoded the API key into the emailFactory, the Request just dies with 403

@taynotfound
Copy link
Author

data: { message: 'Request failed with status code 403' }

@taynotfound
Copy link
Author

taynotfound commented May 6, 2023

      stack: {
        message: 'Request failed with status code 403',
        name: 'AxiosError',
        stack: 'AxiosError: Request failed with status code 403\n' +
          '    at settle (/root/gpt4free-ts/node_modules/axios/lib/core/settle.js:19:12)\n' +
          '    at IncomingMessage.handleStreamEnd (/root/gpt4free-ts/node_modules/axios/lib/adapters/http.js:570:11)\n' +
          '    at IncomingMessage.emit (node:events:539:35)\n' +
          '    at IncomingMessage.emit (node:domain:475:12)\n' +
          '    at endReadableNT (node:internal/streams/readable:1345:12)\n' +
          '    at processTicksAndRejections (node:internal/process/task_queues:83:21)',
        config: {
          transitional: {
            silentJSONParsing: true,
            forcedJSONParsing: true,
            clarifyTimeoutError: false
          },
          adapter: [ 'xhr', 'http' ],
          transformRequest: [ null ],
          transformResponse: [ null ],
          timeout: 0,
          xsrfCookieName: 'XSRF-TOKEN',
          xsrfHeaderName: 'X-XSRF-TOKEN',
          maxContentLength: -1,
          maxBodyLength: -1,
          env: { Blob: null },
          headers: {
            Accept: 'application/json, text/plain, */*',
            'Content-Type': 'application/json',
            'X-RapidAPI-Key': 'KEY'
            'User-Agent': 'axios/1.4.0',
            'Content-Length': '2',
            'Accept-Encoding': 'gzip, compress, deflate, br'
          },
          baseURL: 'https://temp-mail44.p.rapidapi.com/api/v3/email/',
          method: 'post',
          url: '/new',
          data: '{}'
        },
        code: 'ERR_BAD_REQUEST',
        status: 403
      }

Is the full error stack i get

@taynotfound
Copy link
Author

Yea with tinkering i got it to atleast create mails. Now clerk is complaining about too many requests from the machine. Any idea on how many requests u can make?

@xiangsx
Copy link
Owner

xiangsx commented May 7, 2023

look like your rapid_api_key ia wrong

@xiangsx
Copy link
Owner

xiangsx commented May 7, 2023

you can config it in .env

@xiangsx
Copy link
Owner

xiangsx commented May 7, 2023

      stack: {
        message: 'Request failed with status code 403',
        name: 'AxiosError',
        stack: 'AxiosError: Request failed with status code 403\n' +
          '    at settle (/root/gpt4free-ts/node_modules/axios/lib/core/settle.js:19:12)\n' +
          '    at IncomingMessage.handleStreamEnd (/root/gpt4free-ts/node_modules/axios/lib/adapters/http.js:570:11)\n' +
          '    at IncomingMessage.emit (node:events:539:35)\n' +
          '    at IncomingMessage.emit (node:domain:475:12)\n' +
          '    at endReadableNT (node:internal/streams/readable:1345:12)\n' +
          '    at processTicksAndRejections (node:internal/process/task_queues:83:21)',
        config: {
          transitional: {
            silentJSONParsing: true,
            forcedJSONParsing: true,
            clarifyTimeoutError: false
          },
          adapter: [ 'xhr', 'http' ],
          transformRequest: [ null ],
          transformResponse: [ null ],
          timeout: 0,
          xsrfCookieName: 'XSRF-TOKEN',
          xsrfHeaderName: 'X-XSRF-TOKEN',
          maxContentLength: -1,
          maxBodyLength: -1,
          env: { Blob: null },
          headers: {
            Accept: 'application/json, text/plain, */*',
            'Content-Type': 'application/json',
            'X-RapidAPI-Key': 'KEY'
            'User-Agent': 'axios/1.4.0',
            'Content-Length': '2',
            'Accept-Encoding': 'gzip, compress, deflate, br'
          },
          baseURL: 'https://temp-mail44.p.rapidapi.com/api/v3/email/',
          method: 'post',
          url: '/new',
          data: '{}'
        },
        code: 'ERR_BAD_REQUEST',
        status: 403
      }

Is the full error stack i get

i think you donot subscribe email api

@taynotfound
Copy link
Author

taynotfound commented May 7, 2023 via email

@xiangsx
Copy link
Owner

xiangsx commented May 7, 2023

how do you know you are in blacklist. what reponse when in black

@taynotfound
Copy link
Author

It just told me that i had too many Requests from a Machine.
But yea now it works but i got a other issue

      stack: {
        message: 'Request failed with status code 502',
        name: 'AxiosError',
        stack: 'AxiosError: Request failed with status code 502\n' +
          '    at settle (/root/gpt4free-ts/node_modules/axios/lib/core/settle.js:19:12)\n' +
          '    at RedirectableRequest.handleResponse (/root/gpt4free-ts/node_modules/axios/lib/adapters/http.js:518:9)\n' +
          '    at RedirectableRequest.emit (node:events:527:28)\n' +
          '    at RedirectableRequest.emit (node:domain:475:12)\n' +
          '    at RedirectableRequest._processResponse (/root/gpt4free-ts/node_modules/follow-redirects/index.js:356:10)\n' +
          '    at ClientRequest.RedirectableRequest._onNativeResponse (/root/gpt4free-ts/node_modules/follow-redirects/index.js:62:10)\n' +
          '    at Object.onceWrapper (node:events:642:26)\n' +
          '    at ClientRequest.emit (node:events:527:28)\n' +
          '    at ClientRequest.emit (node:domain:475:12)\n' +
          '    at HTTPParser.parserOnIncomingClient (node:_http_client:631:27)',
        config: {
          transitional: {
            silentJSONParsing: true,
            forcedJSONParsing: true,
            clarifyTimeoutError: false
          },
          adapter: [ 'xhr', 'http' ],
          transformRequest: [ null ],
          transformResponse: [ null ],
          timeout: 0,
          xsrfCookieName: 'XSRF-TOKEN',
          xsrfHeaderName: 'X-XSRF-TOKEN',
          maxContentLength: -1,
          maxBodyLength: -1,
          env: { Blob: null },
          headers: {
            Accept: '*/*',
            'Content-Type': 'application/json',
            authority: 'chat-server.tenant-forefront-default.knative.chi.coreweave.com',
            'accept-language': 'en,fr-FR;q=0.9,fr;q=0.8,es-ES;q=0.7,es;q=0.6,en-US;q=0.5,am;q=0.4,de;q=0.3',
            'cache-control': 'no-cache',
            origin: 'https://chat.forefront.ai',
            pragma: 'no-cache',
            referer: 'https://chat.forefront.ai/',
            'sec-ch-ua': '"Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"',
            'sec-ch-ua-mobile': '?0',
            'sec-ch-ua-platform': '"macOS"',
            'sec-fetch-dest': 'empty',
            'sec-fetch-mode': 'cors',
            'sec-fetch-site': 'cross-site',
            'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36',
            'x-signature': '3ddb594741debf36003514cb00577f699441617673aba26d24ee3b1094a025055fcb30e2aa0635208b7c238098afdef3850af6bbe03875811875dad25125ead9764835181cd8d46b7c0949c53a287c16583db87f4a37e2bcdfd823476b2997e2a7587714844beb73d37c3d1c775b7a1786ff05446196beab16db148a7362b65f8e61be6fae3b45cf1312b749232da3ebebb2dd7aad98ffce7b6f779b917e5cff',
            authorization: 'Bearer CODE',
            'Content-Length': '203',
            'Accept-Encoding': 'gzip, compress, deflate, br'
          },
          responseType: 'stream',
          method: 'post',
          url: 'https://streaming.tenant-forefront-default.knative.chi.coreweave.com/chat',
          data: '{"text":"Hi","action":"new","parentId":"242c3261-e764-40b6-a6fd-2e3602eb7d11","workspaceId":"242c3261-e764-40b6-a6fd-2e3602eb7d11","messagePersona":"607e41fe-95be-497e-8e97-010a59b2e2c0","model":"gpt-4"}'
        },
        code: 'ERR_BAD_RESPONSE',
        status: 502
      }
    }
  }
}

@taynotfound taynotfound changed the title Wont Take RapidAI key even tho its provided Bad Response May 7, 2023
@taynotfound
Copy link
Author

how do you know you are in blacklist. what reponse when in black

The Commit in #8 includes a "Logger" of some sort that sends the error code on why the Token Parser did not work. There it showed me that i had too many requests.

@taynotfound taynotfound changed the title Bad Response Bad Response (Forefront gives Stream Respnse) May 7, 2023
@xiangsx
Copy link
Owner

xiangsx commented May 7, 2023

requests

that because TempEmail44 limit 100/day, if you have credit card, you can change email to TempEmail without '44'

@taynotfound
Copy link
Author

Yea now it has the issue with the stream response

@xiangsx xiangsx closed this as completed May 9, 2023
@taynotfound
Copy link
Author

This is not completed? I still have the response issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants