org.llm4s.reliability.RetryPolicy
See theRetryPolicy companion trait
object RetryPolicy
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RetryPolicy.type
Members list
Value members
Concrete methods
def custom(attempts: Int, delayFn: (Int, LLMError) => FiniteDuration, retryableFn: LLMError => Boolean): RetryPolicy
Custom retry policy.
Custom retry policy.
retryableFn defaults to the library's one retry rule, RetryPolicy.isRetryable, so a policy that only customises the delay retries exactly what the other factories' policies retry.
Attributes
def exponentialBackoff(maxAttempts: Int, baseDelay: FiniteDuration, maxDelay: FiniteDuration): RetryPolicy
Exponential backoff: 2^n * baseDelay.
Exponential backoff: 2^n * baseDelay.
Example: baseDelay=1s → 1s, 2s, 4s, 8s, ...
Attributes
Fixed delay: always wait the same amount of time.
Fixed delay: always wait the same amount of time.
Example: delay=3s → 3s, 3s, 3s, ...
Attributes
Linear backoff: attemptNumber * baseDelay.
Linear backoff: attemptNumber * baseDelay.
Example: baseDelay=2s → 2s, 4s, 6s, 8s, ...
Attributes
No retry: fail immediately on first error.
No retry: fail immediately on first error.
Attributes
In this article