Package org.springframework.ai.openai
Class OpenAiModerationModel
java.lang.Object
org.springframework.ai.openai.OpenAiModerationModel
- 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.
- Author:
- Ahmed Yousri, Ilayaperumal Gopinathan
-
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
-