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.



93
94
95
96
97
98
99
100
101
102
103
# File 'lib/smith/errors.rb', line 93

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.



91
92
93
# File 'lib/smith/errors.rb', line 91

def agent_name
  @agent_name
end

#model_usedObject (readonly)

Returns the value of attribute model_used.



91
92
93
# File 'lib/smith/errors.rb', line 91

def model_used
  @model_used
end