Class PromptTemplateSpec
java.lang.Object
com.sap.ai.sdk.prompt.registry.model.PromptTemplateSpec
PromptTemplateSpec
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for PromptTemplateSpec. -
Method Summary
Modifier and TypeMethodDescriptionadditionalFields(Object additionalFields) Set the additionalFields of thisPromptTemplateSpecinstance and return the same instance.addTemplateItem(PromptTemplate templateItem) Add one template instance to thisPromptTemplateSpec.addToolsItem(ChatCompletionTool toolsItem) Add one tools instance to thisPromptTemplateSpec.static PromptTemplateSpec.Buildercreate()Create a type-safe, fluent-api builder object to construct a newPromptTemplateSpecinstance with all required arguments.Set the defaults of thisPromptTemplateSpecinstance and return the same instance.booleanDeprecated.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of thePromptTemplateSpec.Get defaultsGet responseFormatGet templategetTools()A list of tools the model may call.inthashCode()responseFormat(PromptTemplateSpecResponseFormat responseFormat) Set the responseFormat of thisPromptTemplateSpecinstance and return the same instance.voidsetAdditionalFields(Object additionalFields) Set the additionalFields of thisPromptTemplateSpecinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisPromptTemplateSpecinstance.voidsetDefaults(Object defaults) Set the defaults of thisPromptTemplateSpecinstance.voidsetResponseFormat(PromptTemplateSpecResponseFormat responseFormat) Set the responseFormat of thisPromptTemplateSpecinstance.voidsetTemplate(List<PromptTemplate> template) Set the template of thisPromptTemplateSpecinstance.voidsetTools(List<ChatCompletionTool> tools) Set the tools of thisPromptTemplateSpecinstance.template(List<PromptTemplate> template) Set the template of thisPromptTemplateSpecinstance and return the same instance.toMap()Get the value of all properties of thisPromptTemplateSpecinstance including unrecognized properties.tools(List<ChatCompletionTool> tools) Set the tools of thisPromptTemplateSpecinstance and return the same instance.toString()
-
Constructor Details
-
PromptTemplateSpec
protected PromptTemplateSpec()Default constructor for PromptTemplateSpec.
-
-
Method Details
-
template
Set the template of thisPromptTemplateSpecinstance and return the same instance.- Parameters:
template- The template of thisPromptTemplateSpec- Returns:
- The same instance of this
PromptTemplateSpecclass
-
addTemplateItem
Add one template instance to thisPromptTemplateSpec.- Parameters:
templateItem- The template that should be added- Returns:
- The same instance of type
PromptTemplateSpec
-
getTemplate
Get template- Returns:
- template The template of this
PromptTemplateSpecinstance.
-
setTemplate
Set the template of thisPromptTemplateSpecinstance.- Parameters:
template- The template of thisPromptTemplateSpec
-
defaults
Set the defaults of thisPromptTemplateSpecinstance and return the same instance.- Parameters:
defaults- The defaults of thisPromptTemplateSpec- Returns:
- The same instance of this
PromptTemplateSpecclass
-
getDefaults
Get defaults- Returns:
- defaults The defaults of this
PromptTemplateSpecinstance.
-
setDefaults
Set the defaults of thisPromptTemplateSpecinstance.- Parameters:
defaults- The defaults of thisPromptTemplateSpec
-
additionalFields
Set the additionalFields of thisPromptTemplateSpecinstance and return the same instance.- Parameters:
additionalFields- DEPRECATED. Please use additional_fields instead.- Returns:
- The same instance of this
PromptTemplateSpecclass
-
getAdditionalFields
Deprecated.DEPRECATED. Please use additional_fields instead.- Returns:
- additionalFields The additionalFields of this
PromptTemplateSpecinstance.
-
setAdditionalFields
Set the additionalFields of thisPromptTemplateSpecinstance.- Parameters:
additionalFields- DEPRECATED. Please use additional_fields instead.
-
responseFormat
@Nonnull public PromptTemplateSpec responseFormat(@Nullable PromptTemplateSpecResponseFormat responseFormat) Set the responseFormat of thisPromptTemplateSpecinstance and return the same instance.- Parameters:
responseFormat- The responseFormat of thisPromptTemplateSpec- Returns:
- The same instance of this
PromptTemplateSpecclass
-
getResponseFormat
Get responseFormat- Returns:
- responseFormat The responseFormat of this
PromptTemplateSpecinstance.
-
setResponseFormat
Set the responseFormat of thisPromptTemplateSpecinstance.- Parameters:
responseFormat- The responseFormat of thisPromptTemplateSpec
-
tools
Set the tools of thisPromptTemplateSpecinstance and return the same instance.- Parameters:
tools- A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.- Returns:
- The same instance of this
PromptTemplateSpecclass
-
addToolsItem
Add one tools instance to thisPromptTemplateSpec.- Parameters:
toolsItem- The tools that should be added- Returns:
- The same instance of type
PromptTemplateSpec
-
getTools
A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.- Returns:
- tools The tools of this
PromptTemplateSpecinstance.
-
setTools
Set the tools of thisPromptTemplateSpecinstance.- Parameters:
tools- A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.
-
getCustomFieldNames
Get the names of the unrecognizable properties of thePromptTemplateSpec.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisPromptTemplateSpecinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisPromptTemplateSpecinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisPromptTemplateSpecinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newPromptTemplateSpecinstance with all required arguments.
-
toMap()instead.