SummaryEntry
public static final class SummaryEntry extends SessionEntry
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:284–312摘要条目,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.harness.agent.memory.session 包,继承自 SessionEntry。核心成员包括 getSummary、getFormat、SummaryEntry。
Holds the text of a compaction summary (the condensed version of compacted messages).
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public SummaryEntry(String id, String parentId, Instant timestamp, String summary, String format) | 初始化 `SummaryEntry` 实例。 Creates a new instance. |
public SummaryEntry(String parentId, String summary) | 初始化 `SummaryEntry` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getSummary() | 获取摘要。 Returns the summary. |
public String getFormat() | 获取格式。 Returns the format. |
构造器详情Constructor Detail
SummaryEntry
public SummaryEntry(String id, String parentId, Instant timestamp, String summary, String format)
初始化 SummaryEntry 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
parentId | String | 父级标识(类型 `String`)。The parent id. |
timestamp | Instant | 时间戳(类型 `Instant`)。The timestamp. |
summary | String | 摘要(类型 `String`)。The summary. |
format | String | 格式(类型 `String`)。The format. |
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:289–299SummaryEntry
public SummaryEntry(String parentId, String summary)
初始化 SummaryEntry 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parentId | String | 父级标识(类型 `String`)。The parent id. |
summary | String | 摘要(类型 `String`)。The summary. |
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:301–303方法详情Method Detail
getSummary
public String getSummary()
获取摘要。
Returns the summary.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:305–307getFormat
public String getFormat()
获取格式。
Returns the format.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:309–311