Class ResponseOutputMessage
-
- All Implemented Interfaces:
public final class ResponseOutputMessageAn output message from the model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResponseOutputMessage.BuilderA builder for ResponseOutputMessage.
public final classResponseOutputMessage.ContentA text output from the model.
public final classResponseOutputMessage.StatusThe status of the message input. One of
in_progress,completed, orincomplete. Populated when input items are returned via API.public final classResponseOutputMessage.PhaseLabels an
assistantmessage as intermediate commentary (commentary) or the final answer (final_answer). For models likegpt-5.3-codexand beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
-
Method Summary
Modifier and Type Method Description final Stringid()The unique ID of the output message. final List<ResponseOutputMessage.Content>content()The content of the output message. final JsonValue_role()The role of the output message. final ResponseOutputMessage.Statusstatus()The status of the message input. final JsonValue_type()The type of the output message. final Optional<ResponseOutputMessage.Phase>phase()Labels an assistantmessage as intermediate commentary (commentary) or the final answer (final_answer).final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<List<ResponseOutputMessage.Content>>_content()Returns the raw JSON value of content. final JsonField<ResponseOutputMessage.Status>_status()Returns the raw JSON value of status. final JsonField<ResponseOutputMessage.Phase>_phase()Returns the raw JSON value of phase. final Map<String, JsonValue>_additionalProperties()final ResponseOutputMessage.BuildertoBuilder()final ResponseOutputMessagevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseOutputMessage.Builderbuilder()Returns a mutable builder for constructing an instance of ResponseOutputMessage. -
-
Method Detail
-
content
final List<ResponseOutputMessage.Content> content()
The content of the output message.
-
_role
final JsonValue _role()
The role of the output message. Always
assistant.Expected to always return the following:
JsonValue.from("assistant")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
status
final ResponseOutputMessage.Status status()
The status of the message input. One of
in_progress,completed, orincomplete. Populated when input items are returned via API.
-
_type
final JsonValue _type()
The type of the output message. Always
message.Expected to always return the following:
JsonValue.from("message")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
phase
final Optional<ResponseOutputMessage.Phase> phase()
Labels an
assistantmessage as intermediate commentary (commentary) or the final answer (final_answer). For models likegpt-5.3-codexand beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_content
final JsonField<List<ResponseOutputMessage.Content>> _content()
Returns the raw JSON value of content.
Unlike content, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<ResponseOutputMessage.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_phase
final JsonField<ResponseOutputMessage.Phase> _phase()
Returns the raw JSON value of phase.
Unlike phase, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseOutputMessage.Builder toBuilder()
-
validate
final ResponseOutputMessage validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ResponseOutputMessage.Builder builder()
Returns a mutable builder for constructing an instance of ResponseOutputMessage.
The following fields are required:
.id() .content() .status()
-
-
-
-