Skip to content

Commit a2e76ad

Browse files
committed
docs(client): fix incorrect comment about timeout calculation. No logic or functional changes.
1 parent f66d2e6 commit a2e76ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openai/_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ def _calculate_retry_timeout(
703703
# Apply exponential backoff, but not more than the max.
704704
sleep_seconds = min(INITIAL_RETRY_DELAY * pow(2.0, nb_retries), MAX_RETRY_DELAY)
705705

706-
# Apply some jitter, plus-or-minus half a second.
706+
# Apply some jitter, take up to at most 25 percent of the retry time.
707707
jitter = 1 - 0.25 * random()
708708
timeout = sleep_seconds * jitter
709709
return timeout if timeout >= 0 else 0

0 commit comments

Comments
 (0)