Class BailianLongTermMemory.Builder

java.lang.Object
io.agentscope.core.memory.bailian.BailianLongTermMemory.Builder
Enclosing class:
BailianLongTermMemory

public static class BailianLongTermMemory.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • apiKey

      public BailianLongTermMemory.Builder apiKey(String apiKey)
      Sets the Bailian API key.
      Parameters:
      apiKey - the DASHSCOPE_API_KEY
      Returns:
      this builder
    • apiBaseUrl

      public BailianLongTermMemory.Builder apiBaseUrl(String apiBaseUrl)
      Sets the Bailian API base URL.
      Parameters:
      apiBaseUrl - the base URL
      Returns:
      this builder
    • userId

      public BailianLongTermMemory.Builder userId(String userId)
      Sets the user identifier for memory organization.
      Parameters:
      userId - the user ID (required)
      Returns:
      this builder
    • memoryLibraryId

      public BailianLongTermMemory.Builder memoryLibraryId(String memoryLibraryId)
      Sets the memory library identifier.
      Parameters:
      memoryLibraryId - the memory library ID
      Returns:
      this builder
    • projectId

      public BailianLongTermMemory.Builder projectId(String projectId)
      Sets the project identifier.
      Parameters:
      projectId - the project ID
      Returns:
      this builder
    • profileSchema

      public BailianLongTermMemory.Builder profileSchema(String profileSchema)
      Sets the profile schema identifier.
      Parameters:
      profileSchema - the profile schema ID
      Returns:
      this builder
    • topK

      Sets the maximum number of search results.
      Parameters:
      topK - the top K value
      Returns:
      this builder
    • minScore

      public BailianLongTermMemory.Builder minScore(Double minScore)
      Sets the minimum similarity score threshold.
      Parameters:
      minScore - the minimum score threshold [0,1]
      Returns:
      this builder
    • enableRerank

      public BailianLongTermMemory.Builder enableRerank(Boolean enableRerank)
      Sets whether to enable reranking.
      Parameters:
      enableRerank - true to enable reranking, false otherwise
      Returns:
      this builder
    • enableJudge

      public BailianLongTermMemory.Builder enableJudge(Boolean enableJudge)
      Sets whether to enable judge.
      Parameters:
      enableJudge - true to enable judge, false otherwise
      Returns:
      this builder
    • enableRewrite

      public BailianLongTermMemory.Builder enableRewrite(Boolean enableRewrite)
      Sets whether to enable rewrite.
      Parameters:
      enableRewrite - true to enable rewrite, false otherwise
      Returns:
      this builder
    • metadata

      public BailianLongTermMemory.Builder metadata(Map<String,Object> metadata)
      Sets custom metadata to be stored with memories.
      Parameters:
      metadata - custom metadata map
      Returns:
      this builder
    • httpTransport

      public BailianLongTermMemory.Builder httpTransport(io.agentscope.core.model.transport.HttpTransport httpTransport)
      Sets the HTTP transport.
      Parameters:
      httpTransport - the HTTP transport
      Returns:
      this builder
    • build

      public BailianLongTermMemory build()
      Builds the BailianLongTermMemory instance.
      Returns:
      a new BailianLongTermMemory instance