Class: DSPy::HistoryEntry
- Inherits:
-
T::Struct
- Object
- T::Struct
- DSPy::HistoryEntry
- Defined in:
- lib/dspy/re_act.rb
Overview
Define a simple struct for history entries with proper type annotations
Instance Method Summary collapse
-
#to_h ⇒ Object
Custom serialization to ensure compatibility with the rest of the code.
Instance Method Details
#to_h ⇒ Object
Custom serialization to ensure compatibility with the rest of the code
21 22 23 24 25 26 27 28 29 |
# File 'lib/dspy/re_act.rb', line 21 def to_h { step: step, thought: thought, action: action, action_input: action_input, observation: observation }.compact end |