Class: DSPy::Instrumentation::CodeActIterationEvent
- Inherits:
-
T::Struct
- Object
- T::Struct
- DSPy::Instrumentation::CodeActIterationEvent
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/instrumentation/event_payloads.rb
Overview
CodeAct iteration event payload
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/dspy/instrumentation/event_payloads.rb', line 365 def to_h hash = { timestamp: , duration_ms: duration_ms, cpu_time_ms: cpu_time_ms, status: status, iteration: iteration, max_iterations: max_iterations, history_length: history_length, code_blocks_executed: code_blocks_executed } hash[:error_type] = error_type if error_type hash[:error_message] = if hash end |