Skip to content

Conversation

@bertmelis
Copy link
Contributor

closes #310

Comment on lines +34 to +37
// Set rate limits for the provider or use ENV variables if set
const limits = Number(requestsPerMinute) > 0 ?
{ tokensPerMinute: Number(tokensPerMinute), requestsPerMinute: Number(requestsPerMinute) } :
PROVIDER_LIMITS[this.provider];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this nullable by default?
Then:

  • when null - use default limits
  • when 0 - turn off rate limits
  • when >0 - set custom rate limits.

This gives us the ability to turn off rate-limiting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. I'm not proficient in typescript so give me some time to learn how to do it.

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

Successfully merging this pull request may close these issues.

Feature: ENVAR for rate limit

2 participants