-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add OpenAI Rate limiting (#1805)
* Implement adaptive rate limiter for OpenAI * Add adaptive rate limiter to Bedrock model * Use a sensible default maximum request rate * Ruff 🐶 * Mark test as xfail after llama_index update * Do not retry on rate limit errors with tenacity * Remove xfail after llama_index version lock * Use events and locks instead of nesting asyncio.run * Ensure that events are always set after rate limit handling * Retry on httpx ReadTimeout errors * Update rate limiters with verbose generation info * Improve end of queue handling in AsyncExecutor * improve types to remove the need for casts (#1817) * Improve interrupt handling * Exit early from queue.join on termination events * Properly cancel running tasks * Add pytest-asyncio to hatch env * Do not await cancelled tasks * Improve task_done marking logic * Increase default concurrency --------- Co-authored-by: Xander Song <axiomofjoy@gmail.com>
- Loading branch information
1 parent
2ca3613
commit 115e044
Showing
8 changed files
with
699 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.