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

Throttling and rate limiting on non LLM API calls #615

Open
leonard-henriquez opened this issue May 14, 2024 · 4 comments
Open

Throttling and rate limiting on non LLM API calls #615

leonard-henriquez opened this issue May 14, 2024 · 4 comments

Comments

@leonard-henriquez
Copy link

I use API that have rate limits and others that need throttling.
What is the right way to this ?
I feel like the Max RPM parameter on the Agent is not a good fit because it seems focused on the number of LLM calls.

@noggynoggy
Copy link
Contributor

Just read the docs its right there

https://docs.crewai.com/core-concepts/Agents/#agent-attributes

@leonard-henriquez
Copy link
Author

@noggynoggy thanks for your answer !!

Actually, as I mentioned in my message, I don't think that the "max_rpm" attribute in the documentation is a good fit for my problem because:

  • it's focused on the number of calls to LLM not my end APIs
  • it doesn't solve throttling problem

Is there something that I missed ?

@noggynoggy
Copy link
Contributor

I am sorry - I do not seem to understand what you want to throttle. Do you mean like "x about of tokens per x amount of time"? I don't know what "my end APIs" is.

@leonard-henriquez
Copy link
Author

I'm using tools that make calls to third-party APIs like:

  • a company search API that allows finding an EU tax number from a business (needs API rate limiting)
  • an email server to send emails (needs throttling)

In case it's not clear what I mean by API rate limiting vs. API throttling, here is an article that talks about it: API Rate Limiting vs. API Throttling: How Are They Different?

Company Search (Rate Limiting)

My API has an X requests per minute limit, so I can't use it more than that. I need to put a limit on tasks, not on agents, for this.

Sending Emails (Throttling)

I can send as many emails as I want, but if I don't put some delay between each email, I will get flagged as spam. I would need to add throttling on tasks for this.

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