Class ResponsesMessage
java.lang.Object
com.azure.ai.openai.responses.models.ResponsesItem
com.azure.ai.openai.responses.models.ResponsesMessage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponsesItem>
- Direct Known Subclasses:
ResponsesAssistantMessage,ResponsesDeveloperMessage,ResponsesSystemMessage,ResponsesUserMessage
A response message item, representing a role and content.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResponsesMessagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResponsesMessage from the JsonReader.getRole()Get the role property: The role associated with the message.Get the status property: The status property.getType()Get the type property: The type property.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.ai.openai.responses.models.ResponsesItem
getIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ResponsesMessage
public ResponsesMessage()Creates an instance of ResponsesMessage class.
-
-
Method Details
-
getType
Get the type property: The type property.- Overrides:
getTypein classResponsesItem- Returns:
- the type value.
-
getRole
Get the role property: The role associated with the message.- Returns:
- the role value.
-
getStatus
Get the status property: The status property.- Returns:
- the status value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ResponsesItem>- Overrides:
toJsonin classResponsesItem- Throws:
IOException
-
fromJson
Reads an instance of ResponsesMessage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ResponsesMessage if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ResponsesMessage.
-