Struct async_openai::types::CreateModerationRequestArgs
source · pub struct CreateModerationRequestArgs { /* private fields */ }
Expand description
Builder for CreateModerationRequest
.
Implementations§
source§impl CreateModerationRequestArgs
impl CreateModerationRequestArgs
sourcepub fn input<VALUE: Into<ModerationInput>>(&mut self, value: VALUE) -> &mut Self
pub fn input<VALUE: Into<ModerationInput>>(&mut self, value: VALUE) -> &mut Self
The input text to classify
sourcepub fn model<VALUE: Into<TextModerationModel>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn model<VALUE: Into<TextModerationModel>>(
&mut self,
value: VALUE
) -> &mut Self
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
.
sourcepub fn build(&self) -> Result<CreateModerationRequest, OpenAIError>
pub fn build(&self) -> Result<CreateModerationRequest, OpenAIError>
Trait Implementations§
source§impl Clone for CreateModerationRequestArgs
impl Clone for CreateModerationRequestArgs
source§fn clone(&self) -> CreateModerationRequestArgs
fn clone(&self) -> CreateModerationRequestArgs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more