snowby666 / poe-api-wrapper

👾 A Python API wrapper for Poe.com. With this, you will have free access to GPT-4, Claude, Llama, Gemini, Mistral and more! 🚀
https://pypi.org/project/poe-api-wrapper/
GNU General Public License v3.0
953 stars 111 forks source link

fix: add 403 status handling and fix missing await in sleep function #203

Closed jishux2 closed 2 weeks ago

jishux2 commented 3 weeks ago

This PR addresses two issues in the request handling:

  1. Fixed a bug where asyncio.sleep() was called without await, which could cause unexpected behavior in the rate limiting mechanism
  2. Added explicit handling for 403 status code responses with retry logic

Technical Details

Notes

The 403 status code handling was added based on observations when using proxies, though it might be beneficial for other scenarios as well where temporary authorization issues occur.

403 retry behavior