Class AgentRateLimiterAdvisor

java.lang.Object
com.flowable.agent.engine.impl.sandbox.ratelimiter.AgentRateLimiterAdvisor
All Implemented Interfaces:
org.springframework.ai.chat.client.advisor.api.Advisor, org.springframework.ai.chat.client.advisor.api.CallAdvisor, Ordered

public class AgentRateLimiterAdvisor extends Object implements org.springframework.ai.chat.client.advisor.api.CallAdvisor
  • Field Details

    • NAME

      public static final String NAME
    • tokenCountEstimator

      protected org.springframework.ai.tokenizer.TokenCountEstimator tokenCountEstimator
    • agentRateLimiter

      protected AgentRateLimiter agentRateLimiter
  • Constructor Details

    • AgentRateLimiterAdvisor

      public AgentRateLimiterAdvisor(AgentRateLimiter agentRateLimiter, org.springframework.ai.tokenizer.TokenCountEstimator tokenCountEstimator)
  • Method Details

    • adviseCall

      public org.springframework.ai.chat.client.ChatClientResponse adviseCall(org.springframework.ai.chat.client.ChatClientRequest chatClientRequest, org.springframework.ai.chat.client.advisor.api.CallAdvisorChain callAdvisorChain)
      Specified by:
      adviseCall in interface org.springframework.ai.chat.client.advisor.api.CallAdvisor
    • adviseCall

      protected org.springframework.ai.chat.client.ChatClientResponse adviseCall(org.springframework.ai.chat.client.ChatClientRequest chatClientRequest, org.springframework.ai.chat.client.advisor.api.CallAdvisorChain callAdvisorChain, AgentInvocationContext agentInvocationContext)
    • getName

      public String getName()
      Specified by:
      getName in interface org.springframework.ai.chat.client.advisor.api.Advisor
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface Ordered
    • getTokenCountEstimator

      public org.springframework.ai.tokenizer.TokenCountEstimator getTokenCountEstimator()
    • getAgentRateLimiter

      public AgentRateLimiter getAgentRateLimiter()