Package com.sap.ai.sdk.orchestration
Class PromptTemplateReference
java.lang.Object
com.sap.ai.sdk.orchestration.PromptTemplate
com.sap.ai.sdk.orchestration.PromptTemplateReference
A reference to a template to use in
OrchestrationModuleConfig.- Since:
- 1.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the scope of the template reference.Nested classes/interfaces inherited from class com.sap.ai.sdk.orchestration.PromptTemplate
PromptTemplate.ReferenceBuilder, PromptTemplate.ReferenceBuilder1, PromptTemplate.ReferenceBuilder2, PromptTemplate.ReferenceBuilder3 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPromptTemplateReference(TemplateRefTemplateRef reference, PromptTemplateReference.ScopeEnum scope, Map<String, String> inputParameters, List<Message> messageHistory) Creates a newPromptTemplateReferenceinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanGet the placeholder values supplied for this template.Get the message history to prepend to the conversation for this template.getScope()The scope of the template reference.inthashCode()protected PromptTemplatingModuleConfigPromptCreate a low-level representation of the template.toString()withInputParameters(Map<String, String> inputParameters) withMessageHistory(List<Message> messageHistory) The scope of the template reference.
-
Constructor Details
-
PromptTemplateReference
protected PromptTemplateReference(@Nonnull TemplateRefTemplateRef reference, @Nonnull PromptTemplateReference.ScopeEnum scope, @Nonnull Map<String, String> inputParameters, @Nonnull List<Message> messageHistory) Creates a newPromptTemplateReferenceinstance.- Parameters:
reference-scope- The scope of the template reference.inputParameters-messageHistory-
-
-
Method Details
-
toLowLevel
Create a low-level representation of the template.- Specified by:
toLowLevelin classPromptTemplate- Returns:
- the low-level representation of the template.
-
getReference
-
getScope
The scope of the template reference. -
getInputParameters
Description copied from class:PromptTemplateGet the placeholder values supplied for this template.- Specified by:
getInputParametersin classPromptTemplate- Returns:
- the placeholder values supplied for this template.
-
getMessageHistory
Description copied from class:PromptTemplateGet the message history to prepend to the conversation for this template.- Specified by:
getMessageHistoryin classPromptTemplate- Returns:
- the message history for this template.
-
toString
-
equals
- Overrides:
equalsin classPromptTemplate
-
canEqual
- Overrides:
canEqualin classPromptTemplate
-
hashCode
public int hashCode()- Overrides:
hashCodein classPromptTemplate
-
withScope
The scope of the template reference.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withInputParameters
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMessageHistory
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-