struct

Anthropic::CompactionContent

Inherits JSON::Serializable < Struct < Value < Object

Compaction content block

Returned during auto-compaction of conversation history.

For conversations using confidential compaction, encrypted_content is returned instead of content. The encrypted blob must be passed back verbatim on subsequent requests; do not inspect or modify it.

Constructors

new(content : String | Nil = nil, encrypted_content : String | Nil = nil, signature : String | Nil = nil, tool_changes : Array(ToolChange) | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

content
Source
encrypted_content
Source
signature

Signature for server-signed compaction blocks. Send the block back unchanged, including the signature.

Source
tool_changes

Tool changes of the compacted range: the tool_addition and tool_removal blocks that take the request's tools to 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.

Source
type
Source