类 PreActingEvent
java.lang.Object
io.agentscope.core.hook.HookEvent
io.agentscope.core.hook.ActingEvent
io.agentscope.core.hook.PreActingEvent
已过时, 待删除: 此 API 元素将从以后的版本中删除。
Event fired before tool execution.
Modifiable: Yes - setToolUse(ToolUseBlock)
Context:
HookEvent.getAgent()- The agent instanceHookEvent.getMemory()- Agent's memoryActingEvent.getToolkit()- The toolkit instanceActingEvent.getToolUse()- The tool call to execute (modifiable)
Note: This is called once per tool. If the reasoning result contains multiple tool calls, this event fires multiple times.
Use Cases:
- Validate or modify tool parameters for each tool call
- Add authentication or context to individual tool calls
- Implement per-tool authorization checks
- Log or monitor individual tool invocations
-
字段概要
从类继承的字段 io.agentscope.core.hook.ActingEvent
toolUse -
构造器概要
构造器构造器说明PreActingEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PreActingEvent. -
方法概要
修饰符和类型方法说明voidsetToolUse(ToolUseBlock toolUse) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Modify the tool call (e.g., change parameters).从类继承的方法 io.agentscope.core.hook.ActingEvent
getToolkit, getToolUse从类继承的方法 io.agentscope.core.hook.HookEvent
appendSystemContent, appendSystemContent, getAgent, getMemory, getSystemMessage, getTimestamp, getType, setSystemMessage
-
构造器详细资料
-
PreActingEvent
已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PreActingEvent.- 参数:
agent- The agent instance (must not be null)toolkit- The toolkit instance (must not be null)toolUse- The tool call to execute (must not be null)- 抛出:
NullPointerException- if agent, toolkit, or toolUse is null
-
-
方法详细资料
-
setToolUse
已过时, 待删除: 此 API 元素将从以后的版本中删除。Modify the tool call (e.g., change parameters).- 参数:
toolUse- The new tool use block (must not be null)- 抛出:
NullPointerException- if toolUse is null
-
MiddlewareBaseinstead.