Class BetaCompactionBlockParam
-
- All Implemented Interfaces:
public final class BetaCompactionBlockParamA compaction block containing summary of previous context.
Users should round-trip these blocks from responses to subsequent requests to maintain context across compaction boundaries.
When content is None, the block represents a failed compaction. The server treats these as no-ops. Empty string content is not allowed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaCompactionBlockParam.BuilderA builder for BetaCompactionBlockParam.
public final classBetaCompactionBlockParam.ToolChange
-
Method Summary
Modifier and Type Method Description final Optional<BetaCacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<String>content()Summary of previously 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()The block's signature as returned, to be sent back verbatim final Optional<List<BetaCompactionBlockParam.ToolChange>>toolChanges()The tool changes of the compacted range, as the server returned them on this block: the tool_additionandtool_removalentries that take the request'stoolsto the tool set in effect at the end of the range.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<BetaCacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. 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<BetaCompactionBlockParam.ToolChange>>_toolChanges()Returns the raw JSON value of toolChanges. final Map<String, JsonValue>_additionalProperties()final BetaCompactionBlockParam.BuildertoBuilder()final BetaCompactionBlockParamvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaCompactionBlockParam.Builderbuilder()Returns a mutable builder for constructing an instance of BetaCompactionBlockParam. -
-
Method Detail
-
cacheControl
final Optional<BetaCacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
content
final Optional<String> content()
Summary of previously compacted content, or null if compaction failed
-
encryptedContent
final Optional<String> encryptedContent()
Opaque metadata from prior compaction, to be round-tripped verbatim
-
signature
final Optional<String> signature()
The block's signature as returned, to be sent back verbatim
-
toolChanges
final Optional<List<BetaCompactionBlockParam.ToolChange>> toolChanges()
The tool changes of the compacted range, as the server returned them on this block: the
tool_additionandtool_removalentries that take the request'stoolsto the tool set in effect at the end of the range. Send them back unchanged with the block.
-
_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).
-
_cacheControl
final JsonField<BetaCacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_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<BetaCompactionBlockParam.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 BetaCompactionBlockParam.Builder toBuilder()
-
validate
final BetaCompactionBlockParam 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 BetaCompactionBlockParam.Builder builder()
Returns a mutable builder for constructing an instance of BetaCompactionBlockParam.
-
-
-
-