Class: Copilot::SectionOverride

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

Override operation for a single system prompt section.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



246
247
248
# File 'lib/copilot/types.rb', line 246

def action
  @action
end

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



246
247
248
# File 'lib/copilot/types.rb', line 246

def content
  @content
end

#transformObject

Returns the value of attribute transform

Returns:

  • (Object)

    the current value of transform



246
247
248
# File 'lib/copilot/types.rb', line 246

def transform
  @transform
end

Instance Method Details

#to_hObject



247
248
249
250
251
# File 'lib/copilot/types.rb', line 247

def to_h
  h = { action: transform ? SectionOverrideAction::TRANSFORM : action }
  h[:content] = content if content
  h
end