Class AssistantChatMessage
java.lang.Object
com.sap.ai.sdk.prompt.registry.model.AssistantChatMessage
- All Implemented Interfaces:
ChatMessage
AssistantChatMessage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static enumGets or Sets role -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for AssistantChatMessage. -
Method Summary
Modifier and TypeMethodDescriptionaddToolCallsItem(MessageToolCall toolCallsItem) Add one toolCalls instance to thisAssistantChatMessage.content(ChatMessageContent content) Set the content of thisAssistantChatMessageinstance and return the same instance.static AssistantChatMessage.Buildercreate()Create a type-safe, fluent-api builder object to construct a newAssistantChatMessageinstance with all required arguments.booleanGet contentgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theAssistantChatMessage.Get refusalgetRole()Get roleThe tool calls generated by the model, such as function calls.inthashCode()Set the refusal of thisAssistantChatMessageinstance and return the same instance.Set the role of thisAssistantChatMessageinstance and return the same instance.voidsetContent(ChatMessageContent content) Set the content of thisAssistantChatMessageinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisAssistantChatMessageinstance.voidsetRefusal(String refusal) Set the refusal of thisAssistantChatMessageinstance.voidSet the role of thisAssistantChatMessageinstance.voidsetToolCalls(List<MessageToolCall> toolCalls) Set the toolCalls of thisAssistantChatMessageinstance.toMap()Get the value of all properties of thisAssistantChatMessageinstance including unrecognized properties.toolCalls(List<MessageToolCall> toolCalls) Set the toolCalls of thisAssistantChatMessageinstance and return the same instance.toString()
-
Constructor Details
-
AssistantChatMessage
protected AssistantChatMessage()Default constructor for AssistantChatMessage.
-
-
Method Details
-
role
Set the role of thisAssistantChatMessageinstance and return the same instance.- Parameters:
role- The role of thisAssistantChatMessage- Returns:
- The same instance of this
AssistantChatMessageclass
-
getRole
Get role- Returns:
- role The role of this
AssistantChatMessageinstance.
-
setRole
Set the role of thisAssistantChatMessageinstance.- Parameters:
role- The role of thisAssistantChatMessage
-
content
Set the content of thisAssistantChatMessageinstance and return the same instance.- Parameters:
content- The content of thisAssistantChatMessage- Returns:
- The same instance of this
AssistantChatMessageclass
-
getContent
Get content- Returns:
- content The content of this
AssistantChatMessageinstance.
-
setContent
Set the content of thisAssistantChatMessageinstance.- Parameters:
content- The content of thisAssistantChatMessage
-
refusal
Set the refusal of thisAssistantChatMessageinstance and return the same instance.- Parameters:
refusal- The refusal of thisAssistantChatMessage- Returns:
- The same instance of this
AssistantChatMessageclass
-
getRefusal
Get refusal- Returns:
- refusal The refusal of this
AssistantChatMessageinstance.
-
setRefusal
Set the refusal of thisAssistantChatMessageinstance.- Parameters:
refusal- The refusal of thisAssistantChatMessage
-
toolCalls
Set the toolCalls of thisAssistantChatMessageinstance and return the same instance.- Parameters:
toolCalls- The tool calls generated by the model, such as function calls.- Returns:
- The same instance of this
AssistantChatMessageclass
-
addToolCallsItem
Add one toolCalls instance to thisAssistantChatMessage.- Parameters:
toolCallsItem- The toolCalls that should be added- Returns:
- The same instance of type
AssistantChatMessage
-
getToolCalls
The tool calls generated by the model, such as function calls.- Returns:
- toolCalls The toolCalls of this
AssistantChatMessageinstance.
-
setToolCalls
Set the toolCalls of thisAssistantChatMessageinstance.- Parameters:
toolCalls- The tool calls generated by the model, such as function calls.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theAssistantChatMessage.- 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 thisAssistantChatMessageinstance.- 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 thisAssistantChatMessageinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisAssistantChatMessageinstance. 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 newAssistantChatMessageinstance with all required arguments.
-
toMap()instead.