Class: ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput
- Defined in:
- lib/moderation_api/models/content_submit_response.rb,
sig/moderation_api/models/content_submit_response.rbs
Defined Under Namespace
Classes: Label
Instance Attribute Summary collapse
-
#data ⇒ Hash{Symbol=>Object}?
Optional structured data produced by the policy.
- #flagged ⇒ Boolean
-
#flagged_fields ⇒ Array<String>?
The keys of the flagged fields if submitting an object.
-
#id ⇒ String
The unique identifier for the classifier output.
- #labels ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label>?
- #probability ⇒ Float
- #type ⇒ Symbol, :classifier
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
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 ⇒ Object
466 |
# File 'sig/moderation_api/models/content_submit_response.rbs', line 466
def initialize: (
|
Instance Attribute Details
#data ⇒ Hash{Symbol=>Object}?
Optional structured data produced by the policy. For face detection: { count, faces: [{ confidence, gender, age }] }.
604 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 604 optional :data, ModerationAPI::Internal::Type::HashOf[ModerationAPI::Internal::Type::Unknown] |
#flagged ⇒ Boolean
587 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 587 required :flagged, ModerationAPI::Internal::Type::Boolean |
#flagged_fields ⇒ Array<String>?
The keys of the flagged fields if submitting an object.
610 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 610 optional :flagged_fields, ModerationAPI::Internal::Type::ArrayOf[String] |
#id ⇒ String
The unique identifier for the classifier output.
582 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 582 required :id, String |
#labels ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label>?
615 616 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 615 optional :labels, -> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput::Label] } |
#probability ⇒ Float
592 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 592 required :probability, Float |
#type ⇒ Symbol, :classifier
597 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 597 required :type, const: :classifier |
Instance Method Details
#to_hash ⇒ {
476 |
# File 'sig/moderation_api/models/content_submit_response.rbs', line 476
def to_hash: -> {
|