Class: ModerationAPI::Models::ContentSubmitResponse::Casebook
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::ContentSubmitResponse::Casebook
- Defined in:
- lib/moderation_api/models/content_submit_response.rb,
sig/moderation_api/models/content_submit_response.rbs
Overview
Defined Under Namespace
Modules: Verdict Classes: Topic
Instance Attribute Summary collapse
-
#agreement ⇒ Float
How unanimous the matching cases are, from 0 to 1: the share of them that decided this way, ignoring how many there are.
-
#case_count ⇒ Float
How many of your past cases backed this ruling.
-
#confidence ⇒ Float
How strongly the casebook holds this ruling, from 0 to 1: the agreement scaled by how much evidence backs it, so a handful of close, recent cases outweighs one distant one.
-
#similarity ⇒ Float
How close the nearest matching case is, from 0 to 1.
-
#topic ⇒ ModerationAPI::Models::ContentSubmitResponse::Casebook::Topic?
The topic the closest matching case is filed under, or null when it has not been grouped into one yet.
-
#verdict ⇒ Symbol, ModerationAPI::Models::ContentSubmitResponse::Casebook::Verdict
The ruling your past decisions point to for this content.
Instance Method Summary collapse
-
#initialize(id:, label:) ⇒ Object
constructor
The topic the closest matching case is filed under, or null when it has not been grouped into one yet.
- #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(id:, label:) ⇒ Object
The topic the closest matching case is filed under, or null when it has not been grouped into one yet.
|
|
# File 'lib/moderation_api/models/content_submit_response.rb', line 240
|
Instance Attribute Details
#agreement ⇒ Float
How unanimous the matching cases are, from 0 to 1: the share of them that decided this way, ignoring how many there are. Always at least 0.8 when a ruling is returned — below that the casebook reports a disagreement instead of picking a side — so it tells you how clean the consensus was, and is not a threshold to re-apply yourself.
203 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 203 required :agreement, Float |
#case_count ⇒ Float
How many of your past cases backed this ruling.
209 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 209 required :case_count, Float |
#confidence ⇒ Float
How strongly the casebook holds this ruling, from 0 to 1: the agreement scaled by how much evidence backs it, so a handful of close, recent cases outweighs one distant one. Older cases count for less, halving in weight roughly every 180 days. This is the number to use in rules when you want a strength condition.
218 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 218 required :confidence, Float |
#similarity ⇒ Float
How close the nearest matching case is, from 0 to 1. 1 means the content is identical to something you have already decided.
225 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 225 required :similarity, Float |
#topic ⇒ ModerationAPI::Models::ContentSubmitResponse::Casebook::Topic?
The topic the closest matching case is filed under, or null when it has not been grouped into one yet.
232 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 232 required :topic, -> { ModerationAPI::Models::ContentSubmitResponse::Casebook::Topic }, nil?: true |
#verdict ⇒ Symbol, ModerationAPI::Models::ContentSubmitResponse::Casebook::Verdict
The ruling your past decisions point to for this content.
238 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 238 required :verdict, enum: -> { ModerationAPI::Models::ContentSubmitResponse::Casebook::Verdict } |
Instance Method Details
#to_hash ⇒ {
168 |
# File 'sig/moderation_api/models/content_submit_response.rbs', line 168
def to_hash: -> {
|