in lib/openai/internal/type/array_of.rb [47:83]
def hash = [self.class, item_type].hash
def coerce(value, state:)
exactness = state.fetch(:exactness)
unless value.is_a?(Array)
exactness[:no] += 1
return value
end
target = item_type
exactness[:yes] += 1
value
.map do |item|
case [nilable?, item]
in [true, nil]
exactness[:yes] += 1
nil
else
OpenAI::Internal::Type::Converter.coerce(target, item, state: state)
end
end
end