Class BetaResponseOutputMessage
-
- All Implemented Interfaces:
public final class BetaResponseOutputMessageAn output message from the model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaResponseOutputMessage.BuilderA builder for BetaResponseOutputMessage.
public final classBetaResponseOutputMessage.ContentA text output from the model.
public final classBetaResponseOutputMessage.StatusThe status of the message input. One of
in_progress,completed, orincomplete. Populated when input items are returned via API.public final classBetaResponseOutputMessage.AgentThe agent that produced this item.
public final classBetaResponseOutputMessage.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<BetaResponseOutputMessage.Content>content()The content of the output message. final JsonValue_role()The role of the output message. final BetaResponseOutputMessage.Statusstatus()The status of the message input. final JsonValue_type()The type of the output message. final Optional<BetaResponseOutputMessage.Agent>agent()The agent that produced this item. final Optional<BetaResponseOutputMessage.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<BetaResponseOutputMessage.Content>>_content()Returns the raw JSON value of content. final JsonField<BetaResponseOutputMessage.Status>_status()Returns the raw JSON value of status. final JsonField<BetaResponseOutputMessage.Agent>_agent()Returns the raw JSON value of agent. final JsonField<BetaResponseOutputMessage.Phase>_phase()Returns the raw JSON value of phase. final Map<String, JsonValue>_additionalProperties()final BetaResponseOutputMessage.BuildertoBuilder()final BetaResponseOutputMessagevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaResponseOutputMessage.Builderbuilder()Returns a mutable builder for constructing an instance of BetaResponseOutputMessage. -
-
Method Detail
-
content
final List<BetaResponseOutputMessage.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 BetaResponseOutputMessage.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).
-
agent
final Optional<BetaResponseOutputMessage.Agent> agent()
The agent that produced this item.
-
phase
final Optional<BetaResponseOutputMessage.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<BetaResponseOutputMessage.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<BetaResponseOutputMessage.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_agent
final JsonField<BetaResponseOutputMessage.Agent> _agent()
Returns the raw JSON value of agent.
Unlike agent, this method doesn't throw if the JSON field has an unexpected type.
-
_phase
final JsonField<BetaResponseOutputMessage.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 BetaResponseOutputMessage.Builder toBuilder()
-
validate
final BetaResponseOutputMessage 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 BetaResponseOutputMessage.Builder builder()
Returns a mutable builder for constructing an instance of BetaResponseOutputMessage.
The following fields are required:
.id() .content() .status()
-
-
-
-