Class ModerationCreateParams
-
- All Implemented Interfaces:
-
com.openai.core.Params
public final class ModerationCreateParams implements Params
Classifies if text and/or image inputs are potentially harmful. Learn more in the moderation guide.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classModerationCreateParams.BuilderA builder for ModerationCreateParams.
public final classModerationCreateParams.Bodypublic final classModerationCreateParams.InputInput (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
-
Method Summary
Modifier and Type Method Description final ModerationCreateParams.Inputinput()Input (or inputs) to classify. final Optional<ModerationModel>model()The content moderation model you would like to use. final JsonField<ModerationCreateParams.Input>_input()Returns the raw JSON value of input. final JsonField<ModerationModel>_model()Returns the raw JSON value of model. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final ModerationCreateParams.BuildertoBuilder()final ModerationCreateParams.Body_body()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static ModerationCreateParams.Builderbuilder()Returns a mutable builder for constructing an instance of ModerationCreateParams. -
-
Method Detail
-
input
final ModerationCreateParams.Input input()
Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
-
model
final Optional<ModerationModel> model()
The content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here.
-
_input
final JsonField<ModerationCreateParams.Input> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<ModerationModel> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final ModerationCreateParams.Builder toBuilder()
-
_body
final ModerationCreateParams.Body _body()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static ModerationCreateParams.Builder builder()
Returns a mutable builder for constructing an instance of ModerationCreateParams.
The following fields are required:
.input()
-
-
-
-