java.lang.Object
com.agentforge4j.config.loader.prompt.PromptLoader
Loads UTF-8 prompt text files from a base directory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadPrompt(Path baseDir, String filePath) Reads a prompt file resolved relative to a base directory.
-
Constructor Details
-
PromptLoader
public PromptLoader()
-
-
Method Details
-
loadPrompt
Reads a prompt file resolved relative to a base directory.- Parameters:
baseDir- base directory used for safe resolutionfilePath- 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 directoryUncheckedIOException- when the file exists but cannot be read
-