Interface ModerationModel
- All Superinterfaces:
Model<ModerationPrompt,
ModerationResponse>
- All Known Implementing Classes:
OpenAiModerationModel
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface ModerationModel
extends Model<ModerationPrompt,ModerationResponse>
The ModerationModel interface defines a generic AI model for moderation. It extends the
Model interface to handle the interaction with various types of AI models. It provides
a single method, call, which takes a ModerationPrompt as input and returns a
ModerationResponse.
- Since:
- 1.0.0
- Author:
- Ahmed Yousri
-
Method Summary
Modifier and TypeMethodDescriptioncall
(ModerationPrompt request) Executes a method call to the AI model.
-
Method Details
-
call
Description copied from interface:Model
Executes a method call to the AI model.- Specified by:
call
in interfaceModel<ModerationPrompt,
ModerationResponse> - Parameters:
request
- the request object to be sent to the AI model- Returns:
- the response from the AI model
-