crewAI
crewAI copied to clipboard
Throttling and rate limiting on non LLM API calls
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.
Just read the docs its right there
https://docs.crewai.com/core-concepts/Agents/#agent-attributes
@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 ?
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.
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.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.