Package de.xima.fc.prompt.service
Interface IPromptExecutionReplacer
-
public interface IPromptExecutionReplacerReplacer for placeholders within strings, used during prompt execution.- Since:
- 8.5.0
- See Also:
IPromptExecutionReplacerSettings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default IPromptExecutionReplacerBoundbindToSettings(IPromptExecutionReplacerSettings settings)Replaces all placeholders in the given input string according to the configuration of this replacer.Stringreplace(String input, IPromptExecutionReplacerSettings settings)Replaces all placeholders in the given input string according to the configuration of this replacer.
-
-
-
Method Detail
-
bindToSettings
default IPromptExecutionReplacerBound bindToSettings(IPromptExecutionReplacerSettings settings)
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
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.
-
-