Exception: Smith::BlankAgentOutputError
- Inherits:
-
AgentError
- Object
- StandardError
- Error
- AgentError
- Smith::BlankAgentOutputError
- Defined in:
- lib/smith/errors.rb
Instance Attribute Summary collapse
-
#agent_name ⇒ Object
readonly
Returns the value of attribute agent_name.
-
#model_used ⇒ Object
readonly
Returns the value of attribute model_used.
Instance Method Summary collapse
-
#initialize(agent_name:, model_used:) ⇒ BlankAgentOutputError
constructor
A new instance of BlankAgentOutputError.
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_name ⇒ Object (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_used ⇒ Object (readonly)
Returns the value of attribute model_used.
49 50 51 |
# File 'lib/smith/errors.rb', line 49 def model_used @model_used end |