Builder
public static class Builder
io/agentscope/core/memory/bailian/BailianLongTermMemory.java:324–490BailianLongTermMemory的构建器。位于 io.agentscope.core.memory.bailian 包。核心成员包括 apiKey、apiBaseUrl、userId、memoryLibraryId、projectId、profileSchema。
Builder for BailianLongTermMemory.
方法摘要Method Summary
方法详情Method Detail
apiKey
public Builder apiKey(String apiKey)
设置API 键。
Sets the Bailian API key.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiKey | String | DashScope_API_密钥。the DASHSCOPE_API_KEY |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:345–348apiBaseUrl
public Builder apiBaseUrl(String apiBaseUrl)
设置API 基类 URL。
Sets the Bailian API base URL.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiBaseUrl | String | 基类 URL。the base URL |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:356–359userId
public Builder userId(String userId)
设置用户标识。
Sets the user identifier for memory organization.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userId | String | 用户标识(必填)。the user ID (required) |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:367–370memoryLibraryId
public Builder memoryLibraryId(String memoryLibraryId)
设置该配置项。
Sets the memory library identifier.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
memoryLibraryId | String | 记忆 Library 标识(类型 `String`)。the memory library ID |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:378–381projectId
public Builder projectId(String projectId)
设置该配置项。
Sets the project identifier.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
projectId | String | project 标识(类型 `String`)。the project ID |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:389–392profileSchema
public Builder profileSchema(String profileSchema)
设置配置档案模式。
Sets the profile schema identifier.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
profileSchema | String | 配置档案模式标识。the profile schema ID |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:400–403topK
public Builder topK(Integer topK)
设置该配置项。
Sets the maximum number of search results.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
topK | Integer | top K(类型 `Integer`)。the top K value |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:411–414minScore
public Builder minScore(Double minScore)
设置最小分数。
Sets the minimum similarity score threshold.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
minScore | Double | 最小分数(类型 `Double`)。the minimum score threshold [0,1] |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:422–425enableRerank
public Builder enableRerank(Boolean enableRerank)
启用重排。
Sets whether to enable reranking.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableRerank | Boolean | 启用重排(类型 `Boolean`)。true to enable reranking, false otherwise |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:433–436enableJudge
public Builder enableJudge(Boolean enableJudge)
启用评判器。
Sets whether to enable judge.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableJudge | Boolean | 启用评判器(类型 `Boolean`)。true to enable judge, false otherwise |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:444–447enableRewrite
public Builder enableRewrite(Boolean enableRewrite)
启用该配置。
Sets whether to enable rewrite.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableRewrite | Boolean | 启用 Rewrite(类型 `Boolean`)。true to enable rewrite, false otherwise |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:455–458metadata
public Builder metadata(Map<String, Object> metadata)
设置元数据。
Sets custom metadata to be stored with memories.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
metadata | Map<String, Object> | 元数据(类型 `Map`)。custom metadata map |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:466–469httpTransport
public Builder httpTransport(HttpTransport httpTransport)
设置HTTP 传输层。
Sets the HTTP transport.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
httpTransport | HttpTransport | HTTP 传输层。the HTTP transport |
Builderio/agentscope/core/memory/bailian/BailianLongTermMemory.java:477–480build
public BailianLongTermMemory build()
构建BailianLongTermMemory实例。
Builds the BailianLongTermMemory instance.
BailianLongTermMemoryio/agentscope/core/memory/bailian/BailianLongTermMemory.java:487–489