All Implemented Interfaces:
Serializable

public class RateLimitException extends LLMException
Exception indicating that an LLM call exceeded its rate limit. Contains information about when the next retry is allowed.
See Also:
  • Constructor Details

    • RateLimitException

      public RateLimitException()
      Constructs a RateLimitException with the default retry delay.
    • RateLimitException

      public RateLimitException(long retryAfter)
      Constructs a RateLimitException with a custom retry delay.
      Parameters:
      retryAfter - the number of seconds after which the request may be retried
  • Method Details

    • getRetryInstant

      public Instant getRetryInstant()
      Returns the point in time when a new request may be safely attempted.
      Returns:
      an Instant after which the client can retry the request