PhoenixAI.Store.Guardrails.TokenBudget.RateLimiter
(PhoenixAI.Store v0.1.0)
Copy Markdown
View Source
Default Hammer-backed rate limiter for the :time_window scope of
PhoenixAI.Store.Guardrails.TokenBudget.
Start this process in your supervision tree when using the time-window token budget:
children = [
{PhoenixAI.Store.Guardrails.TokenBudget.RateLimiter, clean_period: :timer.minutes(5)}
]The module implements the Hammer behaviour and exposes hit/4.
Summary
Functions
Callback implementation for Hammer.expires_at/2.
Callback implementation for Hammer.get/2.
Callback implementation for Hammer.hit/4.
Callback implementation for Hammer.inc/3.
Callback implementation for Hammer.set/3.
Functions
Callback implementation for Hammer.expires_at/2.
Callback implementation for Hammer.get/2.
Callback implementation for Hammer.hit/4.
Callback implementation for Hammer.inc/3.
Callback implementation for Hammer.set/3.