Class: RobotLab::RunHookContext

Inherits:
HookContext show all
Defined in:
lib/robot_lab/hook_context.rb

Direct Known Subclasses

LlmGenerationHookContext

Instance Attribute Summary collapse

Attributes inherited from HookContext

#event, #metadata

Instance Method Summary collapse

Methods inherited from HookContext

#ext, #local, #to_h, #with_namespace

Constructor Details

#initialize(robot:, request:, network: nil, task: nil, memory: nil, config: nil, response: nil, error: nil) ⇒ RunHookContext

Returns a new instance of RunHookContext.



49
50
51
52
53
54
55
56
57
58
59
# File 'lib/robot_lab/hook_context.rb', line 49

def initialize(robot:, request:, network: nil, task: nil, memory: nil, config: nil, response: nil, error: nil, **)
  super(event: :run, **)
  @robot = robot
  @network = network
  @task = task
  @memory = memory
  @config = config
  @request = request
  @response = response
  @error = error
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



46
47
48
# File 'lib/robot_lab/hook_context.rb', line 46

def config
  @config
end

#errorObject

Returns the value of attribute error.



47
48
49
# File 'lib/robot_lab/hook_context.rb', line 47

def error
  @error
end

#memoryObject (readonly)

Returns the value of attribute memory.



46
47
48
# File 'lib/robot_lab/hook_context.rb', line 46

def memory
  @memory
end

#networkObject (readonly)

Returns the value of attribute network.



46
47
48
# File 'lib/robot_lab/hook_context.rb', line 46

def network
  @network
end

#requestObject

Returns the value of attribute request.



47
48
49
# File 'lib/robot_lab/hook_context.rb', line 47

def request
  @request
end

#responseObject

Returns the value of attribute response.



47
48
49
# File 'lib/robot_lab/hook_context.rb', line 47

def response
  @response
end

#robotObject (readonly)

Returns the value of attribute robot.



46
47
48
# File 'lib/robot_lab/hook_context.rb', line 46

def robot
  @robot
end

#taskObject (readonly)

Returns the value of attribute task.



46
47
48
# File 'lib/robot_lab/hook_context.rb', line 46

def task
  @task
end