Exception: Agentic::Errors::LlmError
- Inherits:
-
StandardError
- Object
- StandardError
- Agentic::Errors::LlmError
- Defined in:
- lib/agentic/errors/llm_error.rb
Overview
Base class for all LLM-related errors
Direct Known Subclasses
LlmAuthenticationError, LlmInvalidRequestError, LlmNetworkError, LlmParseError, LlmRateLimitError, LlmRefusalError, LlmServerError, LlmTimeoutError
Instance Attribute Summary collapse
-
#context ⇒ Hash?
readonly
Additional context about the error.
-
#response ⇒ Hash?
readonly
The raw response from the LLM API, if available.
Instance Method Summary collapse
-
#initialize(message, response: nil, context: nil) ⇒ LlmError
constructor
A new instance of LlmError.
Constructor Details
#initialize(message, response: nil, context: nil) ⇒ LlmError
Returns a new instance of LlmError.
16 17 18 19 20 |
# File 'lib/agentic/errors/llm_error.rb', line 16 def initialize(, response: nil, context: nil) super() @response = response @context = context || {} end |
Instance Attribute Details
#context ⇒ Hash? (readonly)
Returns Additional context about the error.
11 12 13 |
# File 'lib/agentic/errors/llm_error.rb', line 11 def context @context end |
#response ⇒ Hash? (readonly)
Returns The raw response from the LLM API, if available.
8 9 10 |
# File 'lib/agentic/errors/llm_error.rb', line 8 def response @response end |