Class CompletionRequestConfiguration
java.lang.Object
com.sap.ai.sdk.orchestration.model.CompletionRequestConfiguration
- All Implemented Interfaces:
CompletionPostRequest
CompletionRequestConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for CompletionRequestConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionaddMessagesHistoryItem(ChatMessage messagesHistoryItem) Add one messagesHistory instance to thisCompletionRequestConfiguration.config(OrchestrationConfig config) Set the config of thisCompletionRequestConfigurationinstance and return the same instance.create()Create a type-safe, fluent-api builder object to construct a newCompletionRequestConfigurationinstance with all required arguments.booleanGet configgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theCompletionRequestConfiguration.History of chat messages.Get placeholderValuesinthashCode()messagesHistory(List<ChatMessage> messagesHistory) Set the messagesHistory of thisCompletionRequestConfigurationinstance and return the same instance.placeholderValues(Map<String, String> placeholderValues) Set the placeholderValues of thisCompletionRequestConfigurationinstance and return the same instance.putplaceholderValuesItem(String key, String placeholderValuesItem) Put one placeholderValues instance to thisCompletionRequestConfigurationinstance.voidsetConfig(OrchestrationConfig config) Set the config of thisCompletionRequestConfigurationinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisCompletionRequestConfigurationinstance.voidsetMessagesHistory(List<ChatMessage> messagesHistory) Set the messagesHistory of thisCompletionRequestConfigurationinstance.voidsetPlaceholderValues(Map<String, String> placeholderValues) Set the placeholderValues of thisCompletionRequestConfigurationinstance.toMap()Get the value of all properties of thisCompletionRequestConfigurationinstance including unrecognized properties.toString()
-
Constructor Details
-
CompletionRequestConfiguration
protected CompletionRequestConfiguration()Default constructor for CompletionRequestConfiguration.
-
-
Method Details
-
config
Set the config of thisCompletionRequestConfigurationinstance and return the same instance.- Parameters:
config- The config of thisCompletionRequestConfiguration- Returns:
- The same instance of this
CompletionRequestConfigurationclass
-
getConfig
Get config- Returns:
- config The config of this
CompletionRequestConfigurationinstance.
-
setConfig
Set the config of thisCompletionRequestConfigurationinstance.- Parameters:
config- The config of thisCompletionRequestConfiguration
-
placeholderValues
@Nonnull public CompletionRequestConfiguration placeholderValues(@Nullable Map<String, String> placeholderValues) Set the placeholderValues of thisCompletionRequestConfigurationinstance and return the same instance.- Parameters:
placeholderValues- The placeholderValues of thisCompletionRequestConfiguration- Returns:
- The same instance of this
CompletionRequestConfigurationclass
-
putplaceholderValuesItem
@Nonnull public CompletionRequestConfiguration putplaceholderValuesItem(@Nonnull String key, @Nonnull String placeholderValuesItem) Put one placeholderValues instance to thisCompletionRequestConfigurationinstance.- Parameters:
key- The String key of this placeholderValues instanceplaceholderValuesItem- The placeholderValues that should be added under the given key- Returns:
- The same instance of type
CompletionRequestConfiguration
-
getPlaceholderValues
Get placeholderValues- Returns:
- placeholderValues The placeholderValues of this
CompletionRequestConfigurationinstance.
-
setPlaceholderValues
Set the placeholderValues of thisCompletionRequestConfigurationinstance.- Parameters:
placeholderValues- The placeholderValues of thisCompletionRequestConfiguration
-
messagesHistory
@Nonnull public CompletionRequestConfiguration messagesHistory(@Nullable List<ChatMessage> messagesHistory) Set the messagesHistory of thisCompletionRequestConfigurationinstance and return the same instance.- Parameters:
messagesHistory- History of chat messages. Can be used to provide system and assistant messages to set the context of the conversation. Will be merged with the template message- Returns:
- The same instance of this
CompletionRequestConfigurationclass
-
addMessagesHistoryItem
@Nonnull public CompletionRequestConfiguration addMessagesHistoryItem(@Nonnull ChatMessage messagesHistoryItem) Add one messagesHistory instance to thisCompletionRequestConfiguration.- Parameters:
messagesHistoryItem- The messagesHistory that should be added- Returns:
- The same instance of type
CompletionRequestConfiguration
-
getMessagesHistory
History of chat messages. Can be used to provide system and assistant messages to set the context of the conversation. Will be merged with the template message- Returns:
- messagesHistory The messagesHistory of this
CompletionRequestConfigurationinstance.
-
setMessagesHistory
Set the messagesHistory of thisCompletionRequestConfigurationinstance.- Parameters:
messagesHistory- History of chat messages. Can be used to provide system and assistant messages to set the context of the conversation. Will be merged with the template message
-
getCustomFieldNames
Get the names of the unrecognizable properties of theCompletionRequestConfiguration.- 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 thisCompletionRequestConfigurationinstance.- 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 thisCompletionRequestConfigurationinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisCompletionRequestConfigurationinstance. 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 newCompletionRequestConfigurationinstance with all required arguments.
-
toMap()instead.