|
|
|
|
|
by networked
693 days ago
|
|
Backoff doesn't look bad. I have used two libraries for retrying in Python: retry (https://github.com/invl/retry) and Tenacity (https://github.com/jd/tenacity).
Tenacity actually helped me with a recent GPT-4o mini experiment,
when OpenRouter gave me an error after a couple hundred requests.
I can recommend Tenacity.
A downside is that the API is fairly complex and verbose.
You will probably look it up each time if you don't use it often (or rely on an IDE or LLM). Backoff seems somewhat less flexible than Tenacity (https://github.com/litl/backoff/issues/125) but more concise.
Basic use requires as little code as retry and should be easy to remember. |
|