Class ChatCompletionRequestUserMessage
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionRequestUserMessage
- All Implemented Interfaces:
ChatCompletionRequestMessage
public class ChatCompletionRequestUserMessage
extends Object
implements ChatCompletionRequestMessage
ChatCompletionRequestUserMessage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe role of the messages author, in this case `user`. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the content of thisChatCompletionRequestUserMessageinstance and return the same instance.booleanGet contentgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theChatCompletionRequestUserMessage.getName()An optional name for the participant.getRole()The role of the messages author, in this case `user`.inthashCode()Set the name of thisChatCompletionRequestUserMessageinstance and return the same instance.Set the role of thisChatCompletionRequestUserMessageinstance and return the same instance.voidSet the content of thisChatCompletionRequestUserMessageinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisChatCompletionRequestUserMessageinstance.voidSet the name of thisChatCompletionRequestUserMessageinstance.voidSet the role of thisChatCompletionRequestUserMessageinstance.toMap()Get the value of all properties of thisChatCompletionRequestUserMessageinstance including unrecognized properties.toString()
-
Constructor Details
-
ChatCompletionRequestUserMessage
public ChatCompletionRequestUserMessage()
-
-
Method Details
-
content
@Nonnull public ChatCompletionRequestUserMessage content(@Nonnull ChatCompletionRequestUserMessageContent content) Set the content of thisChatCompletionRequestUserMessageinstance and return the same instance.- Parameters:
content- The content of thisChatCompletionRequestUserMessage- Returns:
- The same instance of this
ChatCompletionRequestUserMessageclass
-
getContent
Get content- Returns:
- content The content of this
ChatCompletionRequestUserMessageinstance.
-
setContent
Set the content of thisChatCompletionRequestUserMessageinstance.- Parameters:
content- The content of thisChatCompletionRequestUserMessage
-
role
@Nonnull public ChatCompletionRequestUserMessage role(@Nonnull ChatCompletionRequestUserMessage.RoleEnum role) Set the role of thisChatCompletionRequestUserMessageinstance and return the same instance.- Parameters:
role- The role of the messages author, in this case `user`.- Returns:
- The same instance of this
ChatCompletionRequestUserMessageclass
-
getRole
The role of the messages author, in this case `user`.- Returns:
- role The role of this
ChatCompletionRequestUserMessageinstance.
-
setRole
Set the role of thisChatCompletionRequestUserMessageinstance.- Parameters:
role- The role of the messages author, in this case `user`.
-
name
Set the name of thisChatCompletionRequestUserMessageinstance and return the same instance.- Parameters:
name- An optional name for the participant. Provides the model information to differentiate between participants of the same role.- Returns:
- The same instance of this
ChatCompletionRequestUserMessageclass
-
getName
An optional name for the participant. Provides the model information to differentiate between participants of the same role.- Returns:
- name The name of this
ChatCompletionRequestUserMessageinstance.
-
setName
Set the name of thisChatCompletionRequestUserMessageinstance.- Parameters:
name- An optional name for the participant. Provides the model information to differentiate between participants of the same role.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theChatCompletionRequestUserMessage.- 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 thisChatCompletionRequestUserMessageinstance.- 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 thisChatCompletionRequestUserMessageinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisChatCompletionRequestUserMessageinstance. 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
-
toMap()instead.