Class: DSPy::LM::ResponseMetadata
- Inherits:
-
T::Struct
- Object
- T::Struct
- DSPy::LM::ResponseMetadata
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/lm/response.rb
Overview
Base metadata struct for common fields across providers
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dspy/lm/response.rb', line 19 def to_h hash = { provider: provider, model: model } hash[:response_id] = response_id if response_id hash[:created] = created if created hash[:structured_output] = structured_output unless structured_output.nil? hash end |