AS AgentScopeAPI 手册 / API Reference

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
idString标识(类型 `String`)。The id.
parentIdString父级标识(类型 `String`)。The parent id.
timestampInstant时间戳(类型 `Instant`)。The timestamp.
toolCallIdString工具调用标识(类型 `String`)。The tool call id.
nameString名称(类型 `String`)。The name.
inputMap<String, Object>输入消息(类型 `Map`)。The input.
truncatedBooleantruncated(类型 `Boolean`)。The truncated.
originalSizeIntegeroriginal 大小(类型 `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.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/memory/session/SessionEntry.java:171–173

getName

public String getName()

获取名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/memory/session/SessionEntry.java:175–177

getInput

public Map<String, Object> getInput()

获取输入。

Returns the input.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/harness/agent/memory/session/SessionEntry.java:179–181

isTruncated

public boolean isTruncated()

判断是否 isTruncated。

Returns whether the truncated.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/memory/session/SessionEntry.java:183–185

getOriginalSize

public Integer getOriginalSize()

获取 getOriginalSize。

Returns the original size.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/harness/agent/memory/session/SessionEntry.java:187–189

继承成员Inherited Members

继承自Methods inherited from SessionEntry
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.