ToolUseEntry
public static final class ToolUseEntry extends SessionEntry
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:145–190工具使用条目,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.harness.agent.memory.session 包,继承自 SessionEntry。核心成员包括 getToolCallId、getName、getInput、isTruncated、getOriginalSize、ToolUseEntry。
Structured tool-call record. Process-complete and machine-readable; input may be
truncated with #truncated/#originalSize set.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public ToolUseEntry(String id, String parentId, Instant timestamp, String toolCallId, String name, Map<String, Object> input, Boolean truncated, Integer originalSize) | 初始化 `ToolUseEntry` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getToolCallId() | 获取工具调用标识。 Returns the tool call id. |
public String getName() | 获取名称。 Returns the name. |
public Map<String, Object> getInput() | 获取输入。 Returns the input. |
public boolean isTruncated() | 判断是否 `isTruncated`。 Returns whether the truncated. |
public Integer getOriginalSize() | 获取 `getOriginalSize`。 Returns the original size. |
构造器详情Constructor Detail
ToolUseEntry
public ToolUseEntry(String id, String parentId, Instant timestamp, String toolCallId, String name, Map<String, Object> input, Boolean truncated, Integer originalSize)
初始化 ToolUseEntry 实例。
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. |
input | Map<String, Object> | 输入消息(类型 `Map`)。The input. |
truncated | Boolean | truncated(类型 `Boolean`)。The truncated. |
originalSize | Integer | original 大小(类型 `Integer`)。The original size. |
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:153–169方法详情Method Detail
getToolCallId
public String getToolCallId()
获取工具调用标识。
Returns the tool call id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:171–173getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:175–177getInput
public Map<String, Object> getInput()
获取输入。
Returns the input.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:179–181isTruncated
public boolean isTruncated()
判断是否 isTruncated。
Returns whether the truncated.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:183–185getOriginalSize
public Integer getOriginalSize()
获取 getOriginalSize。
Returns the original size.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/harness/agent/memory/session/SessionEntry.java:187–189