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.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CreateModerationRequestArgs
impl Debug for CreateModerationRequestArgs
Auto Trait Implementations§
impl Freeze for CreateModerationRequestArgs
impl RefUnwindSafe for CreateModerationRequestArgs
impl Send for CreateModerationRequestArgs
impl Sync for CreateModerationRequestArgs
impl Unpin for CreateModerationRequestArgs
impl UnwindSafe for CreateModerationRequestArgs
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)