Class CompactedResponse
-
- All Implemented Interfaces:
public final class CompactedResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCompactedResponse.BuilderA builder for CompactedResponse.
-
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<ResponseOutputItem>output()The compacted list of output items. final ResponseUsageusage()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<ResponseOutputItem>>_output()Returns the raw JSON value of output. final JsonField<ResponseUsage>_usage()Returns the raw JSON value of usage. final Map<String, JsonValue>_additionalProperties()final CompactedResponse.BuildertoBuilder()final CompactedResponsevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CompactedResponse.Builderbuilder()Returns a mutable builder for constructing an instance of CompactedResponse. -
-
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<ResponseOutputItem> output()
The compacted list of output items. This is a list of all user messages, followed by a single compaction item.
-
usage
final ResponseUsage 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<ResponseOutputItem>> _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<ResponseUsage> _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 CompactedResponse.Builder toBuilder()
-
validate
final CompactedResponse 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 CompactedResponse.Builder builder()
Returns a mutable builder for constructing an instance of CompactedResponse.
The following fields are required:
.id() .createdAt() .output() .usage()
-
-
-
-