类 SystemMessage

java.lang.Object
dev.langchain4j.data.message.SystemMessage
所有已实现的接口:
ChatMessage

public class SystemMessage extends Object implements ChatMessage
Represents a system message, typically defined by a developer. This type of message usually provides instructions regarding the AI's actions, such as its behavior or response style.
  • 构造器详细资料

    • SystemMessage

      public SystemMessage(String text)
      Creates a new system message.
      参数:
      text - the message text.
  • 方法详细资料

    • text

      public String text()
      Returns the message text.
      指定者:
      text 在接口中 ChatMessage
      返回:
      the message text.
    • type

      public ChatMessageType type()
      从接口复制的说明: ChatMessage
      The type of the message.
      指定者:
      type 在接口中 ChatMessage
      返回:
      the type of the message
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • from

      public static SystemMessage from(String text)
      Creates a new system message.
      参数:
      text - the message text.
      返回:
      the system message.
    • systemMessage

      public static SystemMessage systemMessage(String text)
      Creates a new system message.
      参数:
      text - the message text.
      返回:
      the system message.