OpenAI::CompactResource
Inherits JSON::Serializable < Reference < Object
Constructors
new(pull : JSON::PullParser)
Sourcenew(id : String = "", object : CompactResourceObject = CompactResourceObject::ResponseCompaction, output : Array(OutputItem) = [] of OutputItem, created_at : Int64 = 0, usage : ResponseUsage = ResponseUsage.new)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
created_at=(created_at : Int64)
Unix timestamp (in seconds) when the compacted conversation was created.
output
The compacted list of output items. This is a list of all user messages, followed by a single compaction item.
The compacted list of output items. This is a list of all user messages, followed by a single compaction item.
usage
Token accounting for the compaction pass, including cached, reasoning, and total tokens.
usage=(usage : ResponseUsage)
Token accounting for the compaction pass, including cached, reasoning, and total tokens.