Class AnthropicRateLimit

java.lang.Object
org.springframework.ai.anthropic.metadata.AnthropicRateLimit
All Implemented Interfaces:
org.springframework.ai.chat.metadata.RateLimit

public class AnthropicRateLimit extends Object implements org.springframework.ai.chat.metadata.RateLimit
RateLimit implementation for OpenAI.
Since:
1.0.0
Author:
Christian Tzolov
  • Constructor Details

    • AnthropicRateLimit

      public AnthropicRateLimit(Long requestsLimit, Long requestsRemaining, Duration requestsReset, Long tokensLimit, Long tokensRemaining, Duration tokensReset)
  • Method Details

    • getRequestsLimit

      public Long getRequestsLimit()
      Specified by:
      getRequestsLimit in interface org.springframework.ai.chat.metadata.RateLimit
    • getTokensLimit

      public Long getTokensLimit()
      Specified by:
      getTokensLimit in interface org.springframework.ai.chat.metadata.RateLimit
    • getRequestsRemaining

      public Long getRequestsRemaining()
      Specified by:
      getRequestsRemaining in interface org.springframework.ai.chat.metadata.RateLimit
    • getTokensRemaining

      public Long getTokensRemaining()
      Specified by:
      getTokensRemaining in interface org.springframework.ai.chat.metadata.RateLimit
    • getRequestsReset

      public Duration getRequestsReset()
      Specified by:
      getRequestsReset in interface org.springframework.ai.chat.metadata.RateLimit
    • getTokensReset

      public Duration getTokensReset()
      Specified by:
      getTokensReset in interface org.springframework.ai.chat.metadata.RateLimit
    • toString

      public String toString()
      Overrides:
      toString in class Object