类的使用
io.agentscope.core.message.ToolUseBlock
使用ToolUseBlock的程序包
程序包
说明
-
io.agentscope.core.agent.accumulator中ToolUseBlock的使用
修饰符和类型方法说明ReasoningContext.getAccumulatedToolCall(String id) Get accumulated tool call by ID.ToolCallsAccumulator.getAccumulatedToolCall(String id) Get accumulated tool call by ID.返回变量类型为ToolUseBlock的类型的io.agentscope.core.agent.accumulator中的方法修饰符和类型方法说明ReasoningContext.getAllAccumulatedToolCalls()Get all accumulated tool calls.ToolCallsAccumulator.getAllAccumulatedToolCalls()Get all accumulated tool calls. -
io.agentscope.core.formatter.dashscope中ToolUseBlock的使用
类型变量类型为ToolUseBlock的io.agentscope.core.formatter.dashscope中的方法参数修饰符和类型方法说明DashScopeToolsHelper.convertToolCalls(List<ToolUseBlock> toolBlocks) Convert ToolUseBlock list to DashScope ToolCall format. -
io.agentscope.core.formatter.ollama中ToolUseBlock的使用
类型变量类型为ToolUseBlock的io.agentscope.core.formatter.ollama中的方法参数修饰符和类型方法说明OllamaToolsHelper.convertToolCalls(List<ToolUseBlock> toolBlocks) Convert ToolUseBlock list to OllamaToolCall list. -
io.agentscope.core.hook中ToolUseBlock的使用
参数类型为ToolUseBlock的io.agentscope.core.hook中的方法修饰符和类型方法说明voidPreActingEvent.setToolUse(ToolUseBlock toolUse) Modify the tool call (e.g., change parameters).参数类型为ToolUseBlock的io.agentscope.core.hook中的构造器限定符构造器说明ActingChunkEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse, ToolResultBlock chunk) Constructor for ActingChunkEvent.protectedActingEvent(HookEventType type, Agent agent, Toolkit toolkit, ToolUseBlock toolUse) Constructor for ActingEvent.PostActingEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse, ToolResultBlock toolResult) Constructor for PostActingEvent.PreActingEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse) Constructor for PreActingEvent. -
io.agentscope.core.interruption中ToolUseBlock的使用
返回变量类型为ToolUseBlock的类型的io.agentscope.core.interruption中的方法修饰符和类型方法说明InterruptContext.getPendingToolCalls()Get the list of tool calls that were pending when the interruption occurred.类型变量类型为ToolUseBlock的io.agentscope.core.interruption中的方法参数修饰符和类型方法说明InterruptContext.Builder.pendingToolCalls(List<ToolUseBlock> pendingToolCalls) Set the pending tool calls at the time of interruption. -
io.agentscope.core.message中ToolUseBlock的使用
参数类型为ToolUseBlock的io.agentscope.core.message中的方法修饰符和类型方法说明static ToolResultBlockToolResultBlock.suspended(ToolUseBlock toolUse) Creates a suspended tool result with default message.static ToolResultBlockToolResultBlock.suspended(ToolUseBlock toolUse, ToolSuspendException exception) Creates a suspended tool result from a ToolSuspendException. -
io.agentscope.core.tool中ToolUseBlock的使用
参数类型为ToolUseBlock的io.agentscope.core.tool中的方法修饰符和类型方法说明static MsgToolResultMessageBuilder.buildToolResultMsg(ToolResultBlock result, ToolUseBlock originalCall, String agentName) Build a tool result message from a ToolResultBlock and the original tool call.ToolCallParam.Builder.toolUseBlock(ToolUseBlock toolUseBlock) Sets the tool use block.类型变量类型为ToolUseBlock的io.agentscope.core.tool中的方法参数修饰符和类型方法说明reactor.core.publisher.Mono<List<ToolResultBlock>> Toolkit.callTools(List<ToolUseBlock> toolCalls, ExecutionConfig agentExecutionConfig, Agent agent, ToolExecutionContext agentContext) Execute multiple tools asynchronously with agent-level context (internal use by ReActAgent).voidToolkit.setChunkCallback(BiConsumer<ToolUseBlock, ToolResultBlock> callback) Set the chunk callback for streaming tool responses.voidToolkit.setInternalChunkCallback(BiConsumer<ToolUseBlock, ToolResultBlock> callback) Set the framework-internal chunk callback for streaming tool responses. -
io.agentscope.core.util中ToolUseBlock的使用
返回变量类型为ToolUseBlock的类型的io.agentscope.core.util中的方法修饰符和类型方法说明static List<ToolUseBlock> Extract tool calls from the most recent assistant message in the message list.参数类型为ToolUseBlock的io.agentscope.core.util中的方法修饰符和类型方法说明static StringJsonUtils.resolveToolCallArgsJson(ToolUseBlock toolUse) Resolve the arguments JSON string from aToolUseBlock, ensuring the result is always a valid JSON object.