Class: DSPy::Instrumentation::ChainOfThoughtEvent
- Inherits:
-
T::Struct
- Object
- T::Struct
- DSPy::Instrumentation::ChainOfThoughtEvent
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/instrumentation/event_payloads.rb
Overview
Chain of Thought event payload
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/dspy/instrumentation/event_payloads.rb', line 193 def to_h hash = { timestamp: , duration_ms: duration_ms, cpu_time_ms: cpu_time_ms, status: status, signature_class: signature_class, module_name: module_name, model: model, provider: provider } hash[:reasoning_length] = reasoning_length if reasoning_length hash[:answer_length] = answer_length if answer_length hash[:error_type] = error_type if error_type hash[:error_message] = if hash end |