UpstashRatelimitError#

class langchain_community.callbacks.upstash_ratelimit_callback.UpstashRatelimitError(message: str, type: Literal['token', 'request'], limit: int | None = None, reset: float | None = None)[source]#

Upstash Ratelimit Error

Raised when the rate limit is reached in UpstashRatelimitHandler

Parameters:
  • message (str) – error message

  • type (str) – The kind of the limit which was reached. One of β€œtoken” or β€œrequest”

  • limit (Optional[int]) – The limit which was reached. Passed when type is request

  • reset (Optional[int]) – unix timestamp in milliseconds when the limits are reset. Passed when type is request

Examples using UpstashRatelimitError