Interface IPromptExecutionReplacer


public interface IPromptExecutionReplacer
Replacer for placeholders within strings, used during prompt execution.
Since:
8.5.0
See Also:
  • Method Details

    • bindToSettings

      Replaces all placeholders in the given input string according to the configuration of this replacer. Depends on the implementation whether this is more efficient than calling replace multiple times with the same settings.

      The default implementation simply returns a bound replacer that delegates to replace.

      Parameters:
      settings - The settings to use for this replacement. If null, the default settings of this replacer are used.
      Returns:
      The input string with all applicable placeholders replaced.
    • replace

      String replace(String input, IPromptExecutionReplacerSettings settings)
      Replaces all placeholders in the given input string according to the configuration of this replacer.
      Parameters:
      input - The input string possibly containing placeholders.
      settings - The settings to use for this replacement. If null, the default settings of this replacer are used.
      Returns:
      The input string with all applicable placeholders replaced.