module DSPy::Mixins::StructSerialization

def input_values_hash

def input_values_hash
  if instance_variable_defined?(:@input_values)
    instance_variable_get(:@input_values) || {}
  else
    {}
  end
end

def output_properties_hash

def output_properties_hash
  self.class.props.keys.each_with_object({}) do |key, hash|
    hash[key] = send(key)
  end
end

def to_h

def to_h
  hash = input_values_hash
  hash.merge(output_properties_hash)
end