Class BailianAddRequest

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

public class BailianAddRequest extends Object
Request object for adding memories to Bailian Memory API.

This request is sent to the POST /api/v2/apps/memory/add endpoint to record new memories. Bailian will process the messages and extract memorable information using LLM-powered inference.

The metadata fields are used to organize and filter memories, enabling multi-tenant and multi-user scenarios.

  • Constructor Details

    • BailianAddRequest

      public BailianAddRequest()
      Default constructor for Jackson.
  • Method Details

    • getUserId

      public String getUserId()
      Gets the user ID.
      Returns:
      the user ID
    • setUserId

      public void setUserId(String userId)
      Sets the user ID.
      Parameters:
      userId - the user ID
    • getMessages

      public List<BailianMessage> getMessages()
      Gets the messages.
      Returns:
      the messages list
    • setMessages

      public void setMessages(List<BailianMessage> messages)
      Sets the messages.
      Parameters:
      messages - the messages list
    • getCustomContent

      public String getCustomContent()
      Gets the custom content.
      Returns:
      the custom content
    • setCustomContent

      public void setCustomContent(String customContent)
      Sets the custom content.
      Parameters:
      customContent - the custom content
    • getMemoryLibraryId

      public String getMemoryLibraryId()
      Gets the memory library ID.
      Returns:
      the memory library ID
    • setMemoryLibraryId

      public void setMemoryLibraryId(String memoryLibraryId)
      Sets the memory library ID.
      Parameters:
      memoryLibraryId - the memory library ID
    • getProjectId

      public String getProjectId()
      Gets the project ID.
      Returns:
      the project ID
    • setProjectId

      public void setProjectId(String projectId)
      Sets the project ID.
      Parameters:
      projectId - the project ID
    • getProfileSchema

      public String getProfileSchema()
      Gets the profile schema.
      Returns:
      the profile schema
    • setProfileSchema

      public void setProfileSchema(String profileSchema)
      Sets the profile schema.
      Parameters:
      profileSchema - the profile schema
    • getMetadata

      public Map<String,Object> getMetadata()
      Gets the metadata.
      Returns:
      the metadata map
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
      Sets the metadata.
      Parameters:
      metadata - the metadata map
    • builder

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