network
Base class for network utilities, providing exponential backoff time calculation.
- pipecat.utils.network.exponential_backoff_time(attempt: int, min_wait: float = 4, max_wait: float = 10, multiplier: float = 1) float[source]
Calculate exponential backoff wait time.
- Parameters:
attempt – Current attempt number (1-based)
min_wait – Minimum wait time in seconds
max_wait – Maximum wait time in seconds
multiplier – Base multiplier for exponential calculation
- Returns:
Wait time in seconds