Class: Copilot::UserInputRequest

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

Overview

Request for user input from the agent (enables ask_user tool).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#allow_freeformObject

Returns the value of attribute allow_freeform

Returns:

  • (Object)

    the current value of allow_freeform



167
168
169
# File 'lib/copilot/types.rb', line 167

def allow_freeform
  @allow_freeform
end

#choicesObject

Returns the value of attribute choices

Returns:

  • (Object)

    the current value of choices



167
168
169
# File 'lib/copilot/types.rb', line 167

def choices
  @choices
end

#questionObject

Returns the value of attribute question

Returns:

  • (Object)

    the current value of question



167
168
169
# File 'lib/copilot/types.rb', line 167

def question
  @question
end

Class Method Details

.from_hash(h) ⇒ Object



168
169
170
171
172
173
174
# File 'lib/copilot/types.rb', line 168

def self.from_hash(h)
  new(
    question: h["question"],
    choices: h["choices"],
    allow_freeform: h.fetch("allowFreeform", true)
  )
end