Class: SafetyKit::Models::ContentCreateResponse::Score
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- SafetyKit::Models::ContentCreateResponse::Score
- Defined in:
- lib/safety_kit/models/content_create_response.rb,
sig/safety_kit/models/content_create_response.rbs
Instance Attribute Summary collapse
-
#classifier_id ⇒ String
Identifier of the classifier that produced this score.
-
#score ⇒ Float
Classifier score between 0 and 1.
-
#version ⇒ String
Version of the classifier that produced this score.
Instance Method Summary collapse
-
#initialize(classifier_id:, score:, version:) ⇒ Object
constructor
Score produced by one classifier for the submitted content.
- #to_hash ⇒ { classifier_id: String, score: Float, version: String }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(classifier_id:, score:, version:) ⇒ Object
Score produced by one classifier for the submitted content.
|
|
# File 'lib/safety_kit/models/content_create_response.rb', line 147
|
Instance Attribute Details
#classifier_id ⇒ String
Identifier of the classifier that produced this score.
133 |
# File 'lib/safety_kit/models/content_create_response.rb', line 133 required :classifier_id, String |
#score ⇒ Float
Classifier score between 0 and 1. Higher means more likely violating.
139 |
# File 'lib/safety_kit/models/content_create_response.rb', line 139 required :score, Float |
#version ⇒ String
Version of the classifier that produced this score.
145 |
# File 'lib/safety_kit/models/content_create_response.rb', line 145 required :version, String |
Instance Method Details
#to_hash ⇒ { classifier_id: String, score: Float, version: String }
100 |
# File 'sig/safety_kit/models/content_create_response.rbs', line 100
def to_hash: -> { classifier_id: String, score: Float, version: String }
|