You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add thread-safe request throttling to prevent API overload. (#2)
* Add thread-safe request throttling to prevent API overload.
- Add RequestThrottler class with semaphore-based concurrency limiting and token bucket rate limiting algorithm
- Integrate throttler into OrtexClient with configurable parameters:
- max_concurrent_requests (default: 2)
- requests_per_second (default: 3.0)
- Add TimeoutError to retry logic for automatic retry on timeouts
- Expose throttler.stats for monitoring request statistics
- Bump version to 1.0.4
This prevents issues when using the client from multiple threads simultaneously, which previously could overwhelm the API and cause all requests to timeout.
* formating correction