Interface IPromptExecutionReplacer
public interface IPromptExecutionReplacer
Replacer for placeholders within strings, used during prompt execution.
- Since:
- 8.5.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault IPromptExecutionReplacerBoundReplaces all placeholders in the given input string according to the configuration of this replacer.replace(String input, IPromptExecutionReplacerSettings settings) Replaces all placeholders in the given input string according to the configuration of this replacer.
-
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 callingreplacemultiple 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
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.
-