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



118
119
120
# File 'lib/copilot/types.rb', line 118

def action
  @action
end

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



118
119
120
# File 'lib/copilot/types.rb', line 118

def content
  @content
end

Instance Method Details

#to_hObject



119
120
121
122
123
# File 'lib/copilot/types.rb', line 119

def to_h
  h = { action: action }
  h[:content] = content if content
  h
end