java.lang.Object
de.seggebaeing.sqlanalyzer.logic.promptable.impl.dummy.SQLDummy
All Implemented Interfaces:
Promptable
Direct Known Subclasses:
RateLimitedSQLDummy

public class SQLDummy extends Object implements Promptable
A dummy Promptable implementation that simulates latency and always returns a fixed SQL query.

This class is useful for testing integration de.seggebaeing.sqlanalyzer.logic without calling a real LLM API. It introduces a random delay between 1 and 5 seconds to mimic response time variability.

  • Constructor Details

    • SQLDummy

      public SQLDummy()
  • Method Details

    • prompt

      public String prompt(String input, String model, String apiKey, double temperature) throws LLMException
      Simulates an LLM call by sleeping for a random time between 1 and 5 seconds, then returning a fixed SQL query.
      Specified by:
      prompt in interface Promptable
      Parameters:
      input - the input prompt (ignored in this dummy implementation)
      model - the model identifier (ignored in this dummy implementation)
      apiKey - the API key (ignored in this dummy implementation)
      temperature - the sampling temperature (ignored in this dummy implementation)
      Returns:
      a fixed SQL query string
      Throws:
      LLMException - never thrown in this dummy implementation