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

Handle and retry after rate limits from OpenAI #14

Open
dcadenas opened this issue Oct 5, 2023 · 2 comments
Open

Handle and retry after rate limits from OpenAI #14

dcadenas opened this issue Oct 5, 2023 · 2 comments

Comments

@dcadenas
Copy link
Contributor

dcadenas commented Oct 5, 2023

No description provided.

@dcadenas dcadenas added this to Cleanstr Oct 5, 2023
@dcadenas dcadenas moved this to 📋 Backlog in Cleanstr Oct 5, 2023
@dcadenas
Copy link
Contributor Author

dcadenas commented Oct 6, 2023

There's Retry after exponential backoff delay already enabled in the topic so any rate limit should be retried correctly.

I'm also adding:

  • Dead Letter topic. So we don't lose any message that still may not be processed and ease monitoring and alerting
  • Random jitter inside the function so when the exponential backoff is elapsed we don't get all retries done at the same time.
  • Not sure if we have slack alert integrations in case we detect rate limit issues of topics increasing.

If this is not enough, in the future we could:

  • Send some kind of token summary of the content to avoid hitting the token limit. It would be naive to just grab a random chunk of the content because the offensive part could be in another place but there may be other options we could investigate
  • Fill the Increase Request Limit Form but we'd need to probe we really need that

@dcadenas dcadenas moved this from 📋 Backlog to 🏗 In progress in Cleanstr Oct 6, 2023
@dcadenas dcadenas moved this from 🏗 In progress to ✅ Done in Cleanstr Oct 7, 2023
@dcadenas
Copy link
Contributor Author

dcadenas commented Oct 7, 2023

Related #15

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

No branches or pull requests

1 participant