moderation

Java-friendly overload that accepts a Consumer for configuring the moderation request.

Return

An OpenaiModerationBuildingStep for specifying the mock response to moderation requests.

Parameters

name

Optional identifier for the mock configuration.

block

Consumer to configure the request matching criteria via OpenaiModerationRequestSpecification.


Sets up a mock handler for the OpenAI /v1/moderations endpoint, allowing configuration of request matching for moderation requests.

This endpoint classifies if input text or images violate OpenAI's usage policies.

Return

An OpenaiModerationBuildingStep for specifying the mock response to moderation requests.

Parameters

name

Optional identifier for the mock configuration.

block

Lambda to configure the request matching criteria via OpenaiModerationRequestSpecification.

See also