Builder
public static class Builder
源码Source
io/agentscope/core/memory/reme/ReMeLongTermMemory.java:258–305ReMeLongTermMemory的构建器。位于 io.agentscope.core.memory.reme 包。核心成员包括 userId、apiBaseUrl、timeout、build。
Builder for ReMeLongTermMemory.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder userId(String userId) | 设置用户标识。 Sets the userId. |
public Builder apiBaseUrl(String apiBaseUrl) | 设置ReMe API 基类 URL。 Sets the ReMe API base URL. |
public Builder timeout(Duration timeout) | 设置HTTP 请求超时。 Sets the HTTP request timeout. |
public ReMeLongTermMemory build() | 构建ReMeLongTermMemory 实例。 Builds the ReMeLongTermMemory instance. |
方法详情Method Detail
userId
public Builder userId(String userId)
设置用户标识。
Sets the userId.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userId | String | 用户标识。The userId |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/memory/reme/ReMeLongTermMemory.java:269–272apiBaseUrl
public Builder apiBaseUrl(String apiBaseUrl)
设置ReMe API 基类 URL。
Sets the ReMe API base URL.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiBaseUrl | String | API 基类 URL(类型 `String`)。The base URL (e.g., "http://localhost:8002") |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/memory/reme/ReMeLongTermMemory.java:280–283timeout
public Builder timeout(Duration timeout)
设置HTTP 请求超时。
Sets the HTTP request timeout.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
timeout | Duration | 超时时长。The timeout duration |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/memory/reme/ReMeLongTermMemory.java:291–294build
public ReMeLongTermMemory build()
构建ReMeLongTermMemory 实例。
Builds the ReMeLongTermMemory instance.
ReMeLongTermMemory一种新的ReMeLongTermMemory 实例。A new ReMeLongTermMemory instance
IllegalArgumentException可能抛出 `IllegalArgumentException`。If required fields are missing
源码Source
io/agentscope/core/memory/reme/ReMeLongTermMemory.java:302–304