openai-python
openai-python copied to clipboard
docs(client): fix incorrect comment about timeout calculation.
- [x] I understand that this repository is auto-generated and my pull request may not be merged
Changes being requested
Existing annotations misrepresent code behavior; therefore, changed it to comment that correctly describes code behavior.
- Details are explained below.
Additional context & links
AS-IS
https://github.com/openai/openai-python/blob/f66d2e6fdc51c4528c99bb25a8fbca6f9b9b872d/src/openai/_base_client.py#L706-L709
- The
jitteris a number in the range (0.75, 1] and is multiplied onsleep_secounds. Therefore, the description "Apply some jitter, plus-or-minus half a second." is incorrect.
Code Fix vs Comment Fix
By referring to the same functionality code in openai-node repo, we can infer that multiplying the jitter by sleep_second is the intended behavior, so I decided to revise comment.