ToolResultEntry
public static final class ToolResultEntry extends SessionEntry
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:196–248工具结果条目,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.harness.agent.memory.session 包,继承自 SessionEntry。核心成员包括 getToolCallId、getName、getOutput、getOutputBlockTypes、isTruncated、getOriginalSize。
Structured tool-result record, paired with ToolUseEntry via toolCallId.
output may be truncated with #truncated/#originalSize set.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public ToolResultEntry(String id, String parentId, Instant timestamp, String toolCallId, String name, String output, List<String> outputBlockTypes, Boolean truncated, Integer originalSize) | 初始化 `ToolResultEntry` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getToolCallId() | 获取工具调用标识。 Returns the tool call id. |
public String getName() | 获取名称。 Returns the name. |
public String getOutput() | 获取输出。 Returns the output. |
public List<String> getOutputBlockTypes() | 获取输出块类型。 Returns the output block types. |
public boolean isTruncated() | 判断是否 `isTruncated`。 Returns whether the truncated. |
public Integer getOriginalSize() | 获取 `getOriginalSize`。 Returns the original size. |
构造器详情Constructor Detail
ToolResultEntry
public ToolResultEntry(String id, String parentId, Instant timestamp, String toolCallId, String name, String output, List<String> outputBlockTypes, Boolean truncated, Integer originalSize)
初始化 ToolResultEntry 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
parentId | String | 父级标识(类型 `String`)。The parent id. |
timestamp | Instant | 时间戳(类型 `Instant`)。The timestamp. |
toolCallId | String | 工具调用标识(类型 `String`)。The tool call id. |
name | String | 名称(类型 `String`)。The name. |
output | String | 输出(类型 `String`)。The output. |
outputBlockTypes | List<String> | 输出块类型(类型 `List`)。The output block types. |
truncated | Boolean | truncated(类型 `Boolean`)。The truncated. |
originalSize | Integer | original 大小(类型 `Integer`)。The original size. |
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:205–223方法详情Method Detail
getToolCallId
public String getToolCallId()
获取工具调用标识。
Returns the tool call id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:225–227getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:229–231getOutput
public String getOutput()
获取输出。
Returns the output.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:233–235getOutputBlockTypes
public List<String> getOutputBlockTypes()
获取输出块类型。
Returns the output block types.
List<String>返回列出。Returns list.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:237–239isTruncated
public boolean isTruncated()
判断是否 isTruncated。
Returns whether the truncated.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:241–243getOriginalSize
public Integer getOriginalSize()
获取 getOriginalSize。
Returns the original size.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:245–247