Struct rust_ai::openai::apis::moderation::Moderation
source · pub struct Moderation {
pub model: Model,
pub input: Vec<String>,
}
Expand description
Given a input text, outputs if the model classifies it as violating OpenAI’s content policy.
Fields§
§model: Model
Two content moderations models are available: text-moderation-stable
and text-moderation-latest
.
The default is text-moderation-latest
which will be automatically
upgraded over time. This ensures you are always using our most accurate
model. If you use text-moderation-stable
, we will provide advanced
notice before updating the model. Accuracy of text-moderation-stable
may be slightly lower than for text-moderation-latest
.
input: Vec<String>
The input text to classify
Implementations§
Trait Implementations§
source§impl Debug for Moderation
impl Debug for Moderation
source§impl Default for Moderation
impl Default for Moderation
source§impl<'de> Deserialize<'de> for Moderation
impl<'de> Deserialize<'de> for Moderation
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more