langchain_community.callbacks.upstash_ratelimit_callback
.UpstashRatelimitError¶
- class langchain_community.callbacks.upstash_ratelimit_callback.UpstashRatelimitError(message: str, type: Literai['token', 'request'], limit: Optional[int] = None, reset: Optional[float] = None)[source]¶
Upstash Ratelimit Error
当在 UpstashRatelimitHandler 达到速率限制时引发
- 参数
message (str) – 错误消息
type (str) – 达到的限制类型。"token" 或 "request" 之一
limit (Optional[int]) – 达到的限制。当类型为 request 时传递
reset (Optional[int]) – 当限制重置时的 UNIX 时间戳(毫秒)。当类型为 request 时传递