Network

pipecat.utils.network.exponential_backoff_time(attempt, min_wait=4, max_wait=10, multiplier=1)[source]

Calculate exponential backoff wait time.

Parameters:
  • attempt (int) – Current attempt number (1-based)

  • min_wait (float) – Minimum wait time in seconds

  • max_wait (float) – Maximum wait time in seconds

  • multiplier (float) – Base multiplier for exponential calculation

Returns:

Wait time in seconds

Return type:

float