Class: ModerationAPI::Models::ContentSubmitResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModerationAPI::Models::ContentSubmitResponse
- Defined in:
- lib/moderation_api/models/content_submit_response.rb
Overview
Defined Under Namespace
Modules: Insight, Policy Classes: Author, Content, Error, Evaluation, Meta, Recommendation
Instance Attribute Summary collapse
-
#author ⇒ ModerationAPI::Models::ContentSubmitResponse::Author?
The author of the content if your account has authors enabled.
-
#content ⇒ ModerationAPI::Models::ContentSubmitResponse::Content
Potentially modified content.
-
#errors ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Error>?
Policies that had errors.
-
#evaluation ⇒ ModerationAPI::Models::ContentSubmitResponse::Evaluation
The evaluation of the content after running the channel policies.
-
#insights ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight, ModerationAPI::Models::ContentSubmitResponse::Insight::LanguageInsight>
Results of all insights enabled in the channel.
-
#meta ⇒ ModerationAPI::Models::ContentSubmitResponse::Meta
Metadata about the moderation request.
-
#policies ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput>
Results of all policies in the channel.
-
#recommendation ⇒ ModerationAPI::Models::ContentSubmitResponse::Recommendation
The recommendation for the content based on the evaluation.
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput)
Instance Method Summary collapse
-
#initialize(probability:, value:, id: :language, type: :insight) ⇒ Object
constructor
Language insight.
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(probability:, value:, id: :language, type: :insight) ⇒ Object
Language insight
|
|
# File 'lib/moderation_api/models/content_submit_response.rb', line 59
|
Instance Attribute Details
#author ⇒ ModerationAPI::Models::ContentSubmitResponse::Author?
The author of the content if your account has authors enabled. Requires you to send authorId when submitting content.
12 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 12 required :author, -> { ModerationAPI::Models::ContentSubmitResponse::Author }, nil?: true |
#content ⇒ ModerationAPI::Models::ContentSubmitResponse::Content
Potentially modified content.
18 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 18 required :content, -> { ModerationAPI::Models::ContentSubmitResponse::Content } |
#errors ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Error>?
Policies that had errors
56 57 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 56 optional :errors, -> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::ContentSubmitResponse::Error] } |
#evaluation ⇒ ModerationAPI::Models::ContentSubmitResponse::Evaluation
The evaluation of the content after running the channel policies.
24 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 24 required :evaluation, -> { ModerationAPI::Models::ContentSubmitResponse::Evaluation } |
#insights ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Insight::SentimentInsight, ModerationAPI::Models::ContentSubmitResponse::Insight::LanguageInsight>
Results of all insights enabled in the channel.
30 31 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 30 required :insights, -> { ModerationAPI::Internal::Type::ArrayOf[union: ModerationAPI::Models::ContentSubmitResponse::Insight] } |
#meta ⇒ ModerationAPI::Models::ContentSubmitResponse::Meta
Metadata about the moderation request
37 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 37 required :meta, -> { ModerationAPI::Models::ContentSubmitResponse::Meta } |
#policies ⇒ Array<ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput>
Results of all policies in the channel. Sorted by highest probability.
43 44 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 43 required :policies, -> { ModerationAPI::Internal::Type::ArrayOf[union: ModerationAPI::Models::ContentSubmitResponse::Policy] } |
#recommendation ⇒ ModerationAPI::Models::ContentSubmitResponse::Recommendation
The recommendation for the content based on the evaluation.
50 |
# File 'lib/moderation_api/models/content_submit_response.rb', line 50 required :recommendation, -> { ModerationAPI::Models::ContentSubmitResponse::Recommendation } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/moderation_api/models/content_submit_response.rb', line 552
|
.variants ⇒ Array(ModerationAPI::Models::ContentSubmitResponse::Policy::ClassifierOutput, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput)
|
|
# File 'lib/moderation_api/models/content_submit_response.rb', line 496
|