Class BetaCompactionBlock
-
- All Implemented Interfaces:
public final class BetaCompactionBlockA compaction block returned when autocompact is triggered.
When content is None, it indicates the compaction failed to produce a valid summary (e.g., malformed output from the model). Clients may round-trip compaction blocks with null content; the server treats them as no-ops.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaCompactionBlock.BuilderA builder for BetaCompactionBlock.
public final classBetaCompactionBlock.ToolChange
-
Method Summary
Modifier and Type Method Description final Optional<String>content()Summary of compacted content, or null if compaction failed final Optional<String>encryptedContent()Opaque metadata from prior compaction, to be round-tripped verbatim final Optional<String>signature()Signature over the summary, to be sent back with the block verbatim final Optional<List<BetaCompactionBlock.ToolChange>>toolChanges()The tool changes of the compacted range: the tool_additionandtool_removalblocks that take the request'stoolsto the tool set in effect at the end of the range, or[]when the range changed no tool.final BetaCompactionBlockParamtoParam()final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("compaction")final JsonField<String>_content()Returns the raw JSON value of content. final JsonField<String>_encryptedContent()Returns the raw JSON value of encryptedContent. final JsonField<String>_signature()Returns the raw JSON value of signature. final JsonField<List<BetaCompactionBlock.ToolChange>>_toolChanges()Returns the raw JSON value of toolChanges. final Map<String, JsonValue>_additionalProperties()final BetaCompactionBlock.BuildertoBuilder()final BetaCompactionBlockvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaCompactionBlock.Builderbuilder()Returns a mutable builder for constructing an instance of BetaCompactionBlock. -
-
Method Detail
-
encryptedContent
final Optional<String> encryptedContent()
Opaque metadata from prior compaction, to be round-tripped verbatim
-
signature
final Optional<String> signature()
Signature over the summary, to be sent back with the block verbatim
-
toolChanges
final Optional<List<BetaCompactionBlock.ToolChange>> toolChanges()
The tool changes of the compacted range: the
tool_additionandtool_removalblocks that take the request'stoolsto the tool set in effect at the end of the range, or[]when the range changed no tool. Absent when the server did not compute them. Send the block back unchanged.
-
toParam
final BetaCompactionBlockParam toParam()
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("compaction")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_content
final JsonField<String> _content()
Returns the raw JSON value of content.
Unlike content, this method doesn't throw if the JSON field has an unexpected type.
-
_encryptedContent
final JsonField<String> _encryptedContent()
Returns the raw JSON value of encryptedContent.
Unlike encryptedContent, this method doesn't throw if the JSON field has an unexpected type.
-
_signature
final JsonField<String> _signature()
Returns the raw JSON value of signature.
Unlike signature, this method doesn't throw if the JSON field has an unexpected type.
-
_toolChanges
final JsonField<List<BetaCompactionBlock.ToolChange>> _toolChanges()
Returns the raw JSON value of toolChanges.
Unlike toolChanges, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaCompactionBlock.Builder toBuilder()
-
validate
final BetaCompactionBlock 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 BetaCompactionBlock.Builder builder()
Returns a mutable builder for constructing an instance of BetaCompactionBlock.
The following fields are required:
.content() .encryptedContent()
-
-
-
-