Class: DSPy::CodeActHistoryEntry
- Inherits:
-
T::Struct
- Object
- T::Struct
- DSPy::CodeActHistoryEntry
- Defined in:
- lib/dspy/code_act.rb
Overview
Define a simple struct for CodeAct 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
22 23 24 25 26 27 28 29 30 |
# File 'lib/dspy/code_act.rb', line 22 def to_h { step: step, thought: thought, ruby_code: ruby_code, execution_result: execution_result, error_message: }.compact end |