Class BailianLongTermMemory.Builder
java.lang.Object
io.agentscope.core.memory.bailian.BailianLongTermMemory.Builder
- Enclosing class:
- BailianLongTermMemory
Builder for
BailianLongTermMemory.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiBaseUrl(String apiBaseUrl) Sets the Bailian API base URL.Sets the Bailian API key.build()Builds theBailianLongTermMemoryinstance.enableJudge(Boolean enableJudge) Sets whether to enable judge.enableRerank(Boolean enableRerank) Sets whether to enable reranking.enableRewrite(Boolean enableRewrite) Sets whether to enable rewrite.httpTransport(io.agentscope.core.model.transport.HttpTransport httpTransport) Sets the HTTP transport.memoryLibraryId(String memoryLibraryId) Sets the memory library identifier.Sets custom metadata to be stored with memories.Sets the minimum similarity score threshold.profileSchema(String profileSchema) Sets the profile schema identifier.Sets the project identifier.Sets the maximum number of search results.Sets the user identifier for memory organization.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKey
Sets the Bailian API key.- Parameters:
apiKey- the DASHSCOPE_API_KEY- Returns:
- this builder
-
apiBaseUrl
Sets the Bailian API base URL.- Parameters:
apiBaseUrl- the base URL- Returns:
- this builder
-
userId
Sets the user identifier for memory organization.- Parameters:
userId- the user ID (required)- Returns:
- this builder
-
memoryLibraryId
Sets the memory library identifier.- Parameters:
memoryLibraryId- the memory library ID- Returns:
- this builder
-
projectId
Sets the project identifier.- Parameters:
projectId- the project ID- Returns:
- this builder
-
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
Sets the minimum similarity score threshold.- Parameters:
minScore- the minimum score threshold [0,1]- Returns:
- this builder
-
enableRerank
Sets whether to enable reranking.- Parameters:
enableRerank- true to enable reranking, false otherwise- Returns:
- this builder
-
enableJudge
Sets whether to enable judge.- Parameters:
enableJudge- true to enable judge, false otherwise- Returns:
- this builder
-
enableRewrite
Sets whether to enable rewrite.- Parameters:
enableRewrite- true to enable rewrite, false otherwise- Returns:
- this builder
-
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
Builds theBailianLongTermMemoryinstance.- Returns:
- a new
BailianLongTermMemoryinstance
-