Package com.sap.ai.sdk.orchestration
Class OrchestrationTemplate
java.lang.Object
com.sap.ai.sdk.orchestration.TemplateConfig
com.sap.ai.sdk.orchestration.OrchestrationTemplate
A template to use in
OrchestrationModuleConfig.- Since:
- 1.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sap.ai.sdk.orchestration.TemplateConfig
TemplateConfig.ReferenceBuilder, TemplateConfig.ReferenceBuilder1, TemplateConfig.ReferenceBuilder2 -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanCreate aTemplateobject from a YAML provided as String.Please usewithMessages(Message...)instead.getTools()inthashCode()protected PromptTemplatingModuleConfigPromptCreate a low-level representation of the template.toString()withDefaults(Map<String, String> defaults) Set the response format to JSON object.Set the response format to the given JSON schema.withMessages(Message... messages) Create a new template with the given messages.withTemplate(List<ChatMessage> template) Deprecated.withTools(List<ChatCompletionTool> tools) Methods inherited from class com.sap.ai.sdk.orchestration.TemplateConfig
create, reference
-
Method Details
-
withMessages
Create a new template with the given messages.- Parameters:
messages- The messages to use in the template.- Returns:
- The updated template.
-
toLowLevel
Create a low-level representation of the template.- Specified by:
toLowLevelin classTemplateConfig- Returns:
- The low-level representation of the template.
-
withJsonSchemaResponse
Set the response format to the given JSON schema.- Parameters:
schema- The JSON schema to use.- Returns:
- The updated template.
-
withJsonResponse
Set the response format to JSON object.- Returns:
- The updated template.
-
fromYaml
Create aTemplateobject from a YAML provided as String.- Parameters:
inputYaml- the provided YAML- Returns:
- A Template object representing the provided YAML
- Throws:
IOException- if the YAML cannot be parsed or deserialized- Since:
- 1.7.0
-
getTemplate
Please usewithMessages(Message...)instead. -
getDefaults
-
getResponseFormat
-
getTools
-
toString
-
equals
- Overrides:
equalsin classTemplateConfig
-
canEqual
- Overrides:
canEqualin classTemplateConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classTemplateConfig
-
withDefaults
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTools
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTemplate
Deprecated.Please usewithMessages(Message...)instead.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-