Class: ModerationAPI::Models::Queue::ItemListResponse::Item::Label
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::Queue::ItemListResponse::Item::Label
- Defined in:
- lib/moderation_api/models/queue/item_list_response.rb
Instance Attribute Summary collapse
-
#flagged ⇒ Boolean
Whether this label caused a flag.
-
#label ⇒ String
Label name.
-
#score ⇒ Float
Confidence score of the label.
Instance Method Summary collapse
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(id:, content:, flagged:, labels:, status:, timestamp:, actions: nil, author_id: nil, content_type: nil, conversation_id: nil, language: nil) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/moderation_api/models/queue/item_list_response.rb', line 114 class Label < ModerationAPI::Internal::Type::BaseModel # @!attribute flagged # Whether this label caused a flag # # @return [Boolean] required :flagged, ModerationAPI::Internal::Type::Boolean # @!attribute label # Label name # # @return [String] required :label, String # @!attribute score # Confidence score of the label # # @return [Float] required :score, Float # @!method initialize(flagged:, label:, score:) # @param flagged [Boolean] Whether this label caused a flag # # @param label [String] Label name # # @param score [Float] Confidence score of the label end |
Instance Attribute Details
#flagged ⇒ Boolean
Whether this label caused a flag
119 |
# File 'lib/moderation_api/models/queue/item_list_response.rb', line 119 required :flagged, ModerationAPI::Internal::Type::Boolean |
#label ⇒ String
Label name
125 |
# File 'lib/moderation_api/models/queue/item_list_response.rb', line 125 required :label, String |
#score ⇒ Float
Confidence score of the label
131 |
# File 'lib/moderation_api/models/queue/item_list_response.rb', line 131 required :score, Float |