Class BetaCompactedResponse
-
- All Implemented Interfaces:
public final class BetaCompactedResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaCompactedResponse.BuilderA builder for BetaCompactedResponse.
-
Method Summary
Modifier and Type Method Description final Stringid()The unique identifier for the compacted response. final LongcreatedAt()Unix timestamp (in seconds) when the compacted conversation was created. final JsonValue_object_()The object type. final List<BetaResponseOutputItem>output()The compacted list of output items. final BetaResponseUsageusage()Token accounting for the compaction pass, including cached, reasoning, and total tokens. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<Long>_createdAt()Returns the raw JSON value of createdAt. final JsonField<List<BetaResponseOutputItem>>_output()Returns the raw JSON value of output. final JsonField<BetaResponseUsage>_usage()Returns the raw JSON value of usage. final Map<String, JsonValue>_additionalProperties()final BetaCompactedResponse.BuildertoBuilder()final BetaCompactedResponsevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaCompactedResponse.Builderbuilder()Returns a mutable builder for constructing an instance of BetaCompactedResponse. -
-
Method Detail
-
createdAt
final Long createdAt()
Unix timestamp (in seconds) when the compacted conversation was created.
-
_object_
final JsonValue _object_()
The object type. Always
response.compaction.Expected to always return the following:
JsonValue.from("response.compaction")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
output
final List<BetaResponseOutputItem> output()
The compacted list of output items. This is a list of all user messages, followed by a single compaction item.
-
usage
final BetaResponseUsage usage()
Token accounting for the compaction pass, including cached, reasoning, and total tokens.
-
_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.
-
_createdAt
final JsonField<Long> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_output
final JsonField<List<BetaResponseOutputItem>> _output()
Returns the raw JSON value of output.
Unlike output, this method doesn't throw if the JSON field has an unexpected type.
-
_usage
final JsonField<BetaResponseUsage> _usage()
Returns the raw JSON value of usage.
Unlike usage, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaCompactedResponse.Builder toBuilder()
-
validate
final BetaCompactedResponse 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 BetaCompactedResponse.Builder builder()
Returns a mutable builder for constructing an instance of BetaCompactedResponse.
The following fields are required:
.id() .createdAt() .output() .usage()
-
-
-
-