java.lang.Object
de.seggebaeing.sqlanalyzer.logic.promptable.impl.dummy.NumericalDummy
de.seggebaeing.sqlanalyzer.logic.promptable.impl.dummy.RateLimitedNumericalDummy
All Implemented Interfaces:
Promptable

public class RateLimitedNumericalDummy extends NumericalDummy
A dummy implementation that extends NumericalDummy and introduces simulated rate limiting using RateLimiter. Throws RateLimitException if a rate limit is active, otherwise returns a random number string after a short delay.
  • Constructor Details

    • RateLimitedNumericalDummy

      public RateLimitedNumericalDummy()
  • Method Details

    • prompt

      public String prompt(String input, String model, String apiKey, double temperature) throws LLMException
      Simulates prompting with a rate-limited numerical dummy. Checks the RateLimiter before delegating to the parent implementation. May throw a RateLimitException if the rate limit is active.
      Specified by:
      prompt in interface Promptable
      Overrides:
      prompt in class NumericalDummy
      Parameters:
      input - the input string (ignored in this dummy implementation)
      model - the model identifier (ignored)
      apiKey - the API key (ignored)
      temperature - the temperature setting (ignored)
      Returns:
      a random number string produced by the parent dummy
      Throws:
      LLMException - if a rate limit is currently active