Class BailianMessage

java.lang.Object
io.agentscope.core.memory.bailian.BailianMessage

public class BailianMessage extends Object
Represents a message in the Bailian Memory API format.

Messages are used for both adding memories and searching for relevant memories. Each message has a role (user or assistant) and content.

  • Constructor Details

    • BailianMessage

      public BailianMessage()
      Default constructor for Jackson deserialization.
    • BailianMessage

      public BailianMessage(String role, String content)
      Creates a new BailianMessage with specified role and content.
      Parameters:
      role - the role (e.g., "user", "assistant")
      content - the message content
  • Method Details

    • getRole

      public String getRole()
      Gets the role.
      Returns:
      the role
    • setRole

      public void setRole(String role)
      Sets the role.
      Parameters:
      role - the role
    • getContent

      public String getContent()
      Gets the content.
      Returns:
      the content
    • setContent

      public void setContent(String content)
      Sets the content.
      Parameters:
      content - the content
    • builder

      public static BailianMessage.Builder builder()
      Creates a new builder for BailianMessage.
      Returns:
      a new Builder instance