Interface ModerationModel

  • All Implemented Interfaces:

    
    public interface ModerationModel
    
                        

    Represents a model that can moderate text.

    • Constructor Detail

    • Method Detail

      • moderate

         abstract Response<Moderation> moderate(String text)

        Moderates the given text.

        Parameters:
        text - the text to moderate.
        Returns:

        the moderation Response.

      • moderate

         Response<Moderation> moderate(Prompt prompt)

        Moderates the given prompt.

        Parameters:
        prompt - the prompt to moderate.
        Returns:

        the moderation Response.

      • moderate

         abstract Response<Moderation> moderate(List<ChatMessage> messages)

        Moderates the given list of chat messages.

        Parameters:
        messages - the list of chat messages to moderate.
        Returns:

        the moderation Response.

      • moderate

         Response<Moderation> moderate(TextSegment textSegment)

        Moderates the given text segment.

        Parameters:
        textSegment - the text segment to moderate.
        Returns:

        the moderation Response.