接口 ModerationModel

所有已知实现类:
DisabledModerationModel

public interface ModerationModel
Represents a model that can moderate text.
  • 方法详细资料

    • moderate

      Response<Moderation> moderate(String text)
      Moderates the given text.
      参数:
      text - the text to moderate.
      返回:
      the moderation Response.
    • moderate

      default Response<Moderation> moderate(Prompt prompt)
      Moderates the given prompt.
      参数:
      prompt - the prompt to moderate.
      返回:
      the moderation Response.
    • moderate

      default Response<Moderation> moderate(ChatMessage message)
      Moderates the given chat message.
      参数:
      message - the chat message to moderate.
      返回:
      the moderation Response.
    • moderate

      Response<Moderation> moderate(List<ChatMessage> messages)
      Moderates the given list of chat messages.
      参数:
      messages - the list of chat messages to moderate.
      返回:
      the moderation Response.
    • moderate

      default Response<Moderation> moderate(TextSegment textSegment)
      Moderates the given text segment.
      参数:
      textSegment - the text segment to moderate.
      返回:
      the moderation Response.