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.



60
61
62
63
64
65
66
67
68
69
70
# File 'lib/smith/errors.rb', line 60

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.



58
59
60
# File 'lib/smith/errors.rb', line 58

def agent_name
  @agent_name
end

#model_usedObject (readonly)

Returns the value of attribute model_used.



58
59
60
# File 'lib/smith/errors.rb', line 58

def model_used
  @model_used
end