Class: DSPy::ErrorFormatter
- Inherits:
-
Object
- Object
- DSPy::ErrorFormatter
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/error_formatter.rb
Overview
Utility class for formatting complex error messages into human-readable format
Class Method Summary collapse
Class Method Details
.format_error(error_message, context = nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dspy/error_formatter.rb', line 12 def self.format_error(, context = nil) # Try different error patterns in order of specificity if sorbet_type_error?() format_sorbet_type_error() elsif argument_error?() format_argument_error() else # Fallback to original message with minor cleanup () end end |