openai/models/
create_moderation_request.rs

1/*
2 * OpenAI API
3 *
4 * APIs for sampling from and fine-tuning language models
5 *
6 * The version of the OpenAPI document: 1.2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct CreateModerationRequest {
16    #[serde(rename = "input")]
17    pub input: Box<crate::models::CreateModerationRequestInput>,
18    /// 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`. 
19    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
20    pub model: Option<String>,
21}
22
23impl CreateModerationRequest {
24    pub fn new(input: crate::models::CreateModerationRequestInput) -> CreateModerationRequest {
25        CreateModerationRequest {
26            input: Box::new(input),
27            model: None,
28        }
29    }
30}
31
32