Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CompactionConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

Configuration for session compaction. Compaction has two independent categories that may be enabled individually or together. When both are enabled they run as a stackable pipeline (deterministic event editing first, then summarization if the session is still above the target). At least one category must be enabled; a config with neither is rejected (enforced server-side). This message is standalone so it can be reused across surfaces (e.g. on the compact request today, and on session creation for a future reactive trigger).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1CompactionConfig

Returns a new instance of GoogleCloudAiplatformV1CompactionConfig.



5434
5435
5436
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 5434

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#event_editingGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1CompactionConfigEventEditingConfig

Configuration for event-history editing-based compaction. When set, the event history is rewritten in place using deterministic rules (e.g. truncating/ masking oversized tool responses, stripping model thoughts). Corresponds to the JSON property eventEditing



5425
5426
5427
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 5425

def event_editing
  @event_editing
end

#summarizationGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1CompactionConfigLlmSummarizationConfig

Configuration for LLM summarization-based compaction. When set, the session context is summarized with an LLM once it exceeds the summarizer target threshold. Corresponds to the JSON property summarization



5432
5433
5434
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 5432

def summarization
  @summarization
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5439
5440
5441
5442
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 5439

def update!(**args)
  @event_editing = args[:event_editing] if args.key?(:event_editing)
  @summarization = args[:summarization] if args.key?(:summarization)
end