Module de.seggebaeing.sqlanalyzer
Class RateLimitedNumericalDummy
java.lang.Object
de.seggebaeing.sqlanalyzer.logic.promptable.impl.dummy.NumericalDummy
de.seggebaeing.sqlanalyzer.logic.promptable.impl.dummy.RateLimitedNumericalDummy
- All Implemented Interfaces:
Promptable
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 Summary
Constructors -
Method Summary
-
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 theRateLimiter
before delegating to the parent implementation. May throw aRateLimitException
if the rate limit is active.- Specified by:
prompt
in interfacePromptable
- Overrides:
prompt
in classNumericalDummy
- 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
-