pub struct ModerationSideResult {
pub categories: HashMap<String, bool>,
pub category_applied_input_types: HashMap<String, Vec<String>>,
pub category_scores: HashMap<String, f64>,
pub flagged: bool,
pub model: String,
pub type_: ModerationResultType,
}Expand description
A moderation result produced for the response input or generated output.
Fields§
§categories: HashMap<String, bool>A dictionary of moderation categories to booleans, true if the
input is flagged under this category.
category_applied_input_types: HashMap<String, Vec<String>>Which modalities of input are reflected by the score for each
category, e.g. ["text"] or ["text", "image"].
category_scores: HashMap<String, f64>A dictionary of moderation categories to scores.
flagged: boolA boolean indicating whether the content was flagged by any category.
model: StringThe moderation model that produced this result.
type_: ModerationResultTypeThe object type, which is always moderation_result.
Trait Implementations§
Source§impl Clone for ModerationSideResult
impl Clone for ModerationSideResult
Source§impl Debug for ModerationSideResult
impl Debug for ModerationSideResult
Source§impl<'de> Deserialize<'de> for ModerationSideResult
impl<'de> Deserialize<'de> for ModerationSideResult
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
Auto Trait Implementations§
impl Freeze for ModerationSideResult
impl RefUnwindSafe for ModerationSideResult
impl Send for ModerationSideResult
impl Sync for ModerationSideResult
impl Unpin for ModerationSideResult
impl UnsafeUnpin for ModerationSideResult
impl UnwindSafe for ModerationSideResult
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