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

Error 'slow down' on localhost e2e test #12

Open
chuckjewell opened this issue Jan 20, 2024 · 0 comments
Open

Error 'slow down' on localhost e2e test #12

chuckjewell opened this issue Jan 20, 2024 · 0 comments

Comments

@chuckjewell
Copy link

Just installed, and kicked off dist/server and dist/runner.

Both start listening with no complaints.

Kick off a test with: OPENAI_API_BASE_URL='http://127.0.0.1:3000' npx tsx e2e

and get the below error on runner.

Note the only thing I can see wrong is that it is showing server: cloudflare though I have s3 configured with an s3:// address.

According to this thread on the opennai forums, this can sometimes be caused by lack of "Authorization" header.
https://community.openai.com/t/getting-hit-with-429-slow-down-error/482704/16

Runner started for queue "openopenai" listening for "thread-run" jobs
Processing thread-run job "clrmgtt100005iwpwdp54i3mb" for run "clrmgtt100005iwpwdp54i3mb"
Job "clrmgtt100005iwpwdp54i3mb" run "clrmgtt100005iwpwdp54i3mb": >>> chat completion call {
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    {
      role: 'user',
      content: 'What is the weather in San Francisco today?'
    }
  ],
  model: 'gpt-4-1106-preview',
  tools: [ { type: 'function', function: [Object] } ],
  tool_choice: 'auto'
}
Error job "clrmgtt100005iwpwdp54i3mb" run "clrmgtt100005iwpwdp54i3mb": APIError: 429 "slow down"
    at <anonymous> (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/openai-fetch@2.0.1/node_modules/openai-fetch/src/fetch-api.ts:43:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at fn (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/ky@1.1.3/node_modules/ky/source/core/Ky.ts:55:14)
    at Promise.result.<computed> (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/ky@1.1.3/node_modules/ky/source/core/Ky.ts:86:27)
    at OpenAIClient.createChatCompletion (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/openai-fetch@2.0.1/node_modules/openai-fetch/src/openai-client.ts:73:45)
    at ChatModel.runModel (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/@dexaai+dexter@1.1.0/node_modules/@dexaai/dexter/src/model/chat.ts:53:24)
    at ChatModel.run (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/@dexaai+dexter@1.1.0/node_modules/@dexaai/dexter/src/model/model.ts:132:24)
    at Worker.Worker.connection (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/src/runner/index.ts:270:21)
    at async Worker.processJob (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/bullmq@4.13.2/node_modules/bullmq/dist/cjs/classes/worker.js:350:28)
    at async Worker.retryIfFailed (/Users/chuckjewell/git/123/repos/ai_dev/OpenOpenAI/node_modules/.pnpm/bullmq@4.13.2/node_modules/bullmq/dist/cjs/classes/worker.js:537:24) {
  status: 429,
  headers: {
    'alt-svc': 'h3=":443"; ma=86400',
    'cf-ray': '8489bcf009a4efd2-PDX',
    connection: 'keep-alive',
    'content-length': '22',
    'content-type': 'application/json',
    date: 'Sat, 20 Jan 2024 19:31:29 GMT',
    server: 'cloudflare',
    'set-cookie': '__cf_bm=NIGNPPboVXD8fiY_rJBrhjexBEiM7x8_Q4Nkuof9gS4-1705779089-1-ATL5Ajgw+3zdT405fvUxZgi5nnc3+jPQ/+W+uEv1Tk8yuymYc0CDzU2F25WJ0zNVlrF4eVSTlCTvoHOZeG7ZH/A=; path=/; expires=Sat, 20-Jan-24 20:01:29 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None',
    vary: 'Accept-Encoding'
  },
  error: 'slow down',
  code: undefined,
  param: undefined,
  type: undefined
}
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

1 participant