#[non_exhaustive]pub struct CreateModerationRequest {
pub model: Option<String>,
pub input: ModerationInput,
pub extra: BTreeMap<String, Value>,
}Expand description
EN: Request body for POST /v1/moderations.
中文:POST /v1/moderations 的请求体。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: Option<String>EN: Optional moderation model id. 中文:可选的 moderation 模型 ID。
input: ModerationInputEN: Text, text list, or multimodal input to classify. 中文:要分类的文本、文本列表或多模态输入。
extra: BTreeMap<String, Value>EN: Forward-compatible optional fields not yet covered by handwritten types. 中文:手写类型尚未覆盖的前向兼容可选字段。
Implementations§
Source§impl CreateModerationRequest
impl CreateModerationRequest
Sourcepub fn builder() -> CreateModerationRequestBuilder
pub fn builder() -> CreateModerationRequestBuilder
EN: Starts building a moderation request. 中文:开始构建 moderation 请求。
Trait Implementations§
Source§impl Clone for CreateModerationRequest
impl Clone for CreateModerationRequest
Source§fn clone(&self) -> CreateModerationRequest
fn clone(&self) -> CreateModerationRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateModerationRequest
impl Debug for CreateModerationRequest
Source§impl PartialEq for CreateModerationRequest
impl PartialEq for CreateModerationRequest
Source§fn eq(&self, other: &CreateModerationRequest) -> bool
fn eq(&self, other: &CreateModerationRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CreateModerationRequest
impl Serialize for CreateModerationRequest
impl StructuralPartialEq for CreateModerationRequest
Auto Trait Implementations§
impl Freeze for CreateModerationRequest
impl RefUnwindSafe for CreateModerationRequest
impl Send for CreateModerationRequest
impl Sync for CreateModerationRequest
impl Unpin for CreateModerationRequest
impl UnsafeUnpin for CreateModerationRequest
impl UnwindSafe for CreateModerationRequest
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