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>
D
Dustin Ngo committed
115e04478f7192bdb4aa7b7a1cd0a5bd950fb03c
Parent: 2ca3613
Committed by GitHub <noreply@github.com>
on 11/29/2023, 11:40:02 PM