Exception: Ollama::SchemaViolationError
- Defined in:
- lib/ollama/errors.rb
Overview
Raised when structured output does not match the requested JSON schema. Carries structured violation details for repair middleware.
Instance Attribute Summary collapse
-
#violations ⇒ Object
readonly
Returns the value of attribute violations.
Instance Method Summary collapse
-
#initialize(message = nil, violations: []) ⇒ SchemaViolationError
constructor
A new instance of SchemaViolationError.
Constructor Details
#initialize(message = nil, violations: []) ⇒ SchemaViolationError
Returns a new instance of SchemaViolationError.
15 16 17 18 |
# File 'lib/ollama/errors.rb', line 15 def initialize( = nil, violations: []) super() @violations = Array(violations) end |
Instance Attribute Details
#violations ⇒ Object (readonly)
Returns the value of attribute violations.
13 14 15 |
# File 'lib/ollama/errors.rb', line 13 def violations @violations end |