Class ChatCompletionRequestToolMessage
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionRequestToolMessage
- All Implemented Interfaces:
ChatCompletionRequestMessage
public class ChatCompletionRequestToolMessage
extends Object
implements ChatCompletionRequestMessage
ChatCompletionRequestToolMessage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe role of the messages author, in this case `tool`. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the content of thisChatCompletionRequestToolMessageinstance and return the same instance.booleanGet contentgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theChatCompletionRequestToolMessage.getRole()The role of the messages author, in this case `tool`.Tool call that this message is responding to.inthashCode()Set the role of thisChatCompletionRequestToolMessageinstance and return the same instance.voidSet the content of thisChatCompletionRequestToolMessageinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisChatCompletionRequestToolMessageinstance.voidSet the role of thisChatCompletionRequestToolMessageinstance.voidsetToolCallId(String toolCallId) Set the toolCallId of thisChatCompletionRequestToolMessageinstance.toMap()Get the value of all properties of thisChatCompletionRequestToolMessageinstance including unrecognized properties.toolCallId(String toolCallId) Set the toolCallId of thisChatCompletionRequestToolMessageinstance and return the same instance.toString()
-
Constructor Details
-
ChatCompletionRequestToolMessage
public ChatCompletionRequestToolMessage()
-
-
Method Details
-
role
@Nonnull public ChatCompletionRequestToolMessage role(@Nonnull ChatCompletionRequestToolMessage.RoleEnum role) Set the role of thisChatCompletionRequestToolMessageinstance and return the same instance.- Parameters:
role- The role of the messages author, in this case `tool`.- Returns:
- The same instance of this
ChatCompletionRequestToolMessageclass
-
getRole
The role of the messages author, in this case `tool`.- Returns:
- role The role of this
ChatCompletionRequestToolMessageinstance.
-
setRole
Set the role of thisChatCompletionRequestToolMessageinstance.- Parameters:
role- The role of the messages author, in this case `tool`.
-
content
@Nonnull public ChatCompletionRequestToolMessage content(@Nonnull ChatCompletionRequestToolMessageContent content) Set the content of thisChatCompletionRequestToolMessageinstance and return the same instance.- Parameters:
content- The content of thisChatCompletionRequestToolMessage- Returns:
- The same instance of this
ChatCompletionRequestToolMessageclass
-
getContent
Get content- Returns:
- content The content of this
ChatCompletionRequestToolMessageinstance.
-
setContent
Set the content of thisChatCompletionRequestToolMessageinstance.- Parameters:
content- The content of thisChatCompletionRequestToolMessage
-
toolCallId
Set the toolCallId of thisChatCompletionRequestToolMessageinstance and return the same instance.- Parameters:
toolCallId- Tool call that this message is responding to.- Returns:
- The same instance of this
ChatCompletionRequestToolMessageclass
-
getToolCallId
Tool call that this message is responding to.- Returns:
- toolCallId The toolCallId of this
ChatCompletionRequestToolMessageinstance.
-
setToolCallId
Set the toolCallId of thisChatCompletionRequestToolMessageinstance.- Parameters:
toolCallId- Tool call that this message is responding to.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theChatCompletionRequestToolMessage.- 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 thisChatCompletionRequestToolMessageinstance.- 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 thisChatCompletionRequestToolMessageinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisChatCompletionRequestToolMessageinstance. 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.