Exception: Smith::BlankAgentOutputError

Inherits:
AgentError show all
Defined in:
lib/smith/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent_name:, model_used:) ⇒ BlankAgentOutputError

Returns a new instance of BlankAgentOutputError.



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/smith/errors.rb', line 51

def initialize(agent_name:, model_used:)
  @agent_name = agent_name
  @model_used = model_used

  detail = +"agent"
  detail << " :#{agent_name}" if agent_name
  detail << " returned blank output"
  detail << " from model #{model_used}" if model_used

  super(detail)
end

Instance Attribute Details

#agent_nameObject (readonly)

Returns the value of attribute agent_name.



49
50
51
# File 'lib/smith/errors.rb', line 49

def agent_name
  @agent_name
end

#model_usedObject (readonly)

Returns the value of attribute model_used.



49
50
51
# File 'lib/smith/errors.rb', line 49

def model_used
  @model_used
end