Struct async_openai::Moderations
source · pub struct Moderations<'c> { /* private fields */ }
Expand description
Given a input text, outputs if the model classifies it as violating OpenAI’s content policy.
Related guide: Moderations
Implementations§
source§impl<'c> Moderations<'c>
impl<'c> Moderations<'c>
pub fn new(client: &'c Client) -> Self
sourcepub async fn create(
&self,
request: CreateModerationRequest
) -> Result<CreateModerationResponse, OpenAIError>
pub async fn create( &self, request: CreateModerationRequest ) -> Result<CreateModerationResponse, OpenAIError>
Classifies if text violates OpenAI’s Content Policy