Package dev.langchain4j.model.openai
Class OpenAiModerationModel
java.lang.Object
dev.langchain4j.model.openai.OpenAiModerationModel
- All Implemented Interfaces:
dev.langchain4j.model.moderation.ModerationModel
public class OpenAiModerationModel
extends Object
implements dev.langchain4j.model.moderation.ModerationModel
Represents an OpenAI moderation model, such as text-moderation-latest.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
dev.langchain4j.model.output.Response
<dev.langchain4j.model.moderation.Moderation> dev.langchain4j.model.output.Response
<dev.langchain4j.model.moderation.Moderation> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.moderation.ModerationModel
moderate, moderate, moderate
-
Constructor Details
-
OpenAiModerationModel
-
-
Method Details
-
modelName
-
moderate
public dev.langchain4j.model.output.Response<dev.langchain4j.model.moderation.Moderation> moderate(String text) - Specified by:
moderate
in interfacedev.langchain4j.model.moderation.ModerationModel
-
moderate
public dev.langchain4j.model.output.Response<dev.langchain4j.model.moderation.Moderation> moderate(List<dev.langchain4j.data.message.ChatMessage> messages) - Specified by:
moderate
in interfacedev.langchain4j.model.moderation.ModerationModel
-
builder
-