类 PreCallEvent
java.lang.Object
io.agentscope.core.hook.HookEvent
io.agentscope.core.hook.PreCallEvent
Event fired before agent starts processing.
Modifiable: Yes - setInputMessages(List)
Context:
HookEvent.getAgent()- The agent instanceHookEvent.getMemory()- Agent's existing memory or conversation history prior to processing this callgetInputMessages()- Messages input to the agent (modifiable)
Use Cases:
- Log the start of agent execution
- Initialize execution-specific resources
- Track agent invocation metrics
- Filter or modify input messages before agent processing
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Get the input messages for the agent call.voidsetInputMessages(List<Msg> inputMessages) Modify the input messages for the agent call.从类继承的方法 io.agentscope.core.hook.HookEvent
getAgent, getMemory, getTimestamp, getType
-
构造器详细资料
-
PreCallEvent
Constructor for PreCallEvent.- 参数:
agent- The agent instance (must not be null)inputMessages- The messages input to the agent (must not be null)- 抛出:
NullPointerException- if agent or inputMessages is null
-
-
方法详细资料
-
getInputMessages
Get the input messages for the agent call.- 返回:
- The input messages
-
setInputMessages
Modify the input messages for the agent call.- 参数:
inputMessages- The new message list (must not be null)- 抛出:
NullPointerException- if inputMessages is null
-