Package org.springframework.ai.openaisdk
Class OpenAiSdkModerationModel
java.lang.Object
org.springframework.ai.openaisdk.OpenAiSdkModerationModel
- All Implemented Interfaces:
Model<ModerationPrompt,,ModerationResponse> ModerationModel
OpenAI SDK Moderation Model implementation.
This model provides content moderation capabilities using the OpenAI Moderation API through the official OpenAI Java SDK.
- Since:
- 2.0.0
- Author:
- Ilayaperumal Gopinathan, Ahmed Yousri
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()call(ModerationPrompt moderationPrompt) Executes a method call to the AI model.mutate()
-
Method Details
-
builder
-
mutate
-
call
Description copied from interface:ModelExecutes a method call to the AI model.- Specified by:
callin interfaceModel<ModerationPrompt,ModerationResponse> - Specified by:
callin interfaceModerationModel- Parameters:
moderationPrompt- the request object to be sent to the AI model- Returns:
- the response from the AI model
-
getOptions
-