- add retrying of 502 Bad Gateway errors from Cloudflare - use module-global throttle to avoid unecessary retries - solves retries triggering retries issue - throttle parallelization down to serial batches - solves retries triggering retries issue - retry more aiohttp errors - use `resource` module to try to increase file handle limits. but do so with a graceful fallback - refactor of package functions - avoid logger deprecation notices - handle insufficient_quota error - refactor parsing to make it more robust - add automated retry for invalid function JSON
- fix errors due to rate limits responses from OpenAI - account for cloudflare returning HTML responses to the API - add an `IGNORE` option for the token limit mode
- update README with advanced configuration options, including token truncation - fix accidental passing of `openai_org_id` in post body (should only be in header)