Class AssistantMessage
- java.lang.Object
- 
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
- 
- com.oracle.bmc.generativeaiinference.model.Message
- 
- com.oracle.bmc.generativeaiinference.model.AssistantMessage
 
 
 
- 
 @Generated(value="OracleSDKGenerator", comments="API Version: 20231130") public final class AssistantMessage extends MessageRepresents a single instance of assistant message.Note: When responding to a tool call, set content to null (not ""). This ensures the model correctly processes tool call messages in multi-step interactions. 
 Note: Objects should always be created or deserialized using theAssistantMessage.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theAssistantMessage.Builder, which maintain a set of all explicitly set fields calledAssistantMessage.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAssistantMessage.Builder- 
Nested classes/interfaces inherited from class com.oracle.bmc.generativeaiinference.model.MessageMessage.Role
 
- 
 - 
Constructor SummaryConstructors Constructor Description AssistantMessage(List<ChatContent> content, String name, String refusal, List<ToolCall> toolCalls, List<Annotation> annotations)Deprecated.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AssistantMessage.Builderbuilder()Create a new builder.booleanequals(Object o)List<Annotation>getAnnotations()List of annotations generated by the model, including inline citations from web search results.StringgetName()An optional name for the participant.StringgetRefusal()The refusal message by the assistant.List<ToolCall>getToolCalls()The tool calls generated by the model, such as function calls.inthashCode()AssistantMessage.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.- 
Methods inherited from class com.oracle.bmc.generativeaiinference.model.MessagegetContent
 
- 
 
- 
- 
- 
Constructor Detail- 
AssistantMessage@Deprecated public AssistantMessage(List<ChatContent> content, String name, String refusal, List<ToolCall> toolCalls, List<Annotation> annotations) Deprecated.
 
- 
 - 
Method Detail- 
builderpublic static AssistantMessage.Builder builder() Create a new builder.
 - 
toBuilderpublic AssistantMessage.Builder toBuilder() 
 - 
getNamepublic String getName() An optional name for the participant.Provides the model information to differentiate between participants of the same role. - Returns:
- the value
 
 - 
getRefusalpublic String getRefusal() The refusal message by the assistant.- Returns:
- the value
 
 - 
getToolCallspublic List<ToolCall> getToolCalls() The tool calls generated by the model, such as function calls.- Returns:
- the value
 
 - 
getAnnotationspublic List<Annotation> getAnnotations() List of annotations generated by the model, including inline citations from web search results.- Returns:
- the value
 
 - 
toStringpublic String toString(boolean includeByteArrayContents) Return a string representation of the object.
 
- 
 
-