Class SaaStTemplateRenderer
java.lang.Object
com.alibaba.cloud.ai.graph.agent.renderer.SaaStTemplateRenderer
- All Implemented Interfaces:
BiFunction<String,,Map<String, Object>, String> org.springframework.ai.template.TemplateRenderer
public class SaaStTemplateRenderer
extends Object
implements org.springframework.ai.template.TemplateRenderer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for configuring and creatingSaaStTemplateRendererinstances. -
Constructor Summary
ConstructorsConstructorDescriptionSaaStTemplateRenderer(char startDelimiterToken, char endDelimiterToken, org.springframework.ai.template.ValidationMode validationMode, boolean validateStFunctions) Constructs a newSaaStTemplateRendererwith the specified delimiter tokens, validation mode, and function validation flag.SaaStTemplateRenderer(String startDelimiterString, String endDelimiterString, org.springframework.ai.template.ValidationMode validationMode, boolean validateStFunctions) Constructs a newSaaStTemplateRendererwith the specified string delimiter tokens, validation mode, and function validation flag. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
SaaStTemplateRenderer
public SaaStTemplateRenderer(char startDelimiterToken, char endDelimiterToken, org.springframework.ai.template.ValidationMode validationMode, boolean validateStFunctions) Constructs a newSaaStTemplateRendererwith the specified delimiter tokens, validation mode, and function validation flag.- Parameters:
startDelimiterToken- the character used to denote the start of a template variable (e.g., '{')endDelimiterToken- the character used to denote the end of a template variable (e.g., '}')validationMode- the mode to use for template variable validation; must not be nullvalidateStFunctions- whether to validate StringTemplate functions in the template
-
SaaStTemplateRenderer
public SaaStTemplateRenderer(String startDelimiterString, String endDelimiterString, org.springframework.ai.template.ValidationMode validationMode, boolean validateStFunctions) Constructs a newSaaStTemplateRendererwith the specified string delimiter tokens, validation mode, and function validation flag.This constructor supports multi-character delimiters (e.g., "{{" and "}}"), which is useful for avoiding conflicts with JSON content or other text that uses single-character delimiters.
- Parameters:
startDelimiterString- the string used to denote the start of a template variable (e.g., "{{")endDelimiterString- the string used to denote the end of a template variable (e.g., "}}")validationMode- the mode to use for template variable validation; must not be nullvalidateStFunctions- whether to validate StringTemplate functions in the template
-
-
Method Details