Exception: PatientLLM::StructuredOutputError
- Inherits:
-
StandardError
- Object
- StandardError
- PatientLLM::StructuredOutputError
- Defined in:
- lib/patient_llm/structured_output_error.rb
Overview
Raised when an agent declares an output schema but the model's response cannot be parsed as JSON. The unparseable text is available on the error.
Instance Attribute Summary collapse
-
#text ⇒ String?
readonly
The raw response text that failed to parse.
Instance Method Summary collapse
-
#initialize(message, text: nil) ⇒ StructuredOutputError
constructor
A new instance of StructuredOutputError.
Constructor Details
#initialize(message, text: nil) ⇒ StructuredOutputError
Returns a new instance of StructuredOutputError.
10 11 12 13 |
# File 'lib/patient_llm/structured_output_error.rb', line 10 def initialize(, text: nil) super() @text = text end |
Instance Attribute Details
#text ⇒ String? (readonly)
Returns the raw response text that failed to parse.
8 9 10 |
# File 'lib/patient_llm/structured_output_error.rb', line 8 def text @text end |