java.lang.Object
com.agentforge4j.config.loader.prompt.PromptLoader

public final class PromptLoader extends Object
Loads UTF-8 prompt text files from a base directory.
  • Constructor Details

    • PromptLoader

      public PromptLoader()
  • Method Details

    • loadPrompt

      public String loadPrompt(Path baseDir, String filePath)
      Reads a prompt file resolved relative to a base directory.
      Parameters:
      baseDir - base directory used for safe resolution
      filePath - relative path to the prompt file
      Returns:
      prompt file contents as UTF-8 text, or an empty string when the file is absent
      Throws:
      IllegalArgumentException - when inputs are blank or escape the base directory
      UncheckedIOException - when the file exists but cannot be read