类的使用
io.agentscope.core.message.ToolResultBlock
使用ToolResultBlock的程序包
程序包
说明
-
io.agentscope.core.event中ToolResultBlock的使用
返回变量类型为ToolResultBlock的类型的io.agentscope.core.event中的方法类型变量类型为ToolResultBlock的io.agentscope.core.event中的构造器参数限定符构造器说明ExternalExecutionResultEvent(String id, String createdAt, String replyId, List<ToolResultBlock> toolResults) ExternalExecutionResultEvent(String replyId, List<ToolResultBlock> toolResults) -
io.agentscope.core.hook中ToolResultBlock的使用
修饰符和类型方法说明ActingChunkEvent.getChunk()已过时, 待删除: 此 API 元素将从以后的版本中删除。Get the streaming chunk from ToolEmitter.PostActingEvent.getToolResult()已过时, 待删除: 此 API 元素将从以后的版本中删除。Get the tool execution result.参数类型为ToolResultBlock的io.agentscope.core.hook中的方法修饰符和类型方法说明reactor.core.publisher.Mono<Void> LegacyHookDispatcher.fireActingChunk(ToolUseBlock toolUse, ToolResultBlock chunk, Toolkit toolkit) 已过时, 待删除: 此 API 元素将从以后的版本中删除。reactor.core.publisher.Mono<PostActingEvent> LegacyHookDispatcher.firePostActing(ToolUseBlock toolUse, ToolResultBlock result, Toolkit toolkit, Msg toolMsg) 已过时, 待删除: 此 API 元素将从以后的版本中删除。voidPostActingEvent.setToolResult(ToolResultBlock toolResult) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Modify the tool execution result.参数类型为ToolResultBlock的io.agentscope.core.hook中的构造器限定符构造器说明ActingChunkEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse, ToolResultBlock chunk) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for ActingChunkEvent.PostActingEvent(Agent agent, Toolkit toolkit, ToolUseBlock toolUse, ToolResultBlock toolResult) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Constructor for PostActingEvent. -
io.agentscope.core.message中ToolResultBlock的使用
修饰符和类型方法说明ToolResultBlock.Builder.build()Builds a new ToolResultBlock with the configured properties.static ToolResultBlockCreate an error result (for tool method return values).static ToolResultBlockToolResultBlock.of(ContentBlock output) Create a result with output only (for tool method return values).static ToolResultBlockToolResultBlock.of(ContentBlock output, Map<String, Object> metadata) Create a result with output and metadata (for tool method return values).static ToolResultBlockToolResultBlock.of(String id, String name, ContentBlock output) Create a result with id, name, and output (for message ContentBlock).static ToolResultBlockCreate a result with all fields (for message ContentBlock with metadata).static ToolResultBlockToolResultBlock.of(String id, String name, List<ContentBlock> output) Create a result with id, name, and output list (for message ContentBlock).static ToolResultBlockCreate a result with all fields including output list (for message ContentBlock with metadata).static ToolResultBlockToolResultBlock.of(List<ContentBlock> output) Create a result with output list only (for tool method return values).static ToolResultBlockCreate a result with output list and metadata (for tool method return values).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.static ToolResultBlockCreate a simple text result (for tool method return values).ToolResultBlock.withIdAndName(String id, String name) Create a ToolResultBlock for use in messages by setting id and name.ToolResultBlock.withState(ToolResultState state) Returns a copy of this block with the given state.修饰符和类型方法说明ToolResultMessage.Builder.result(ToolResultBlock block) Appends a singleToolResultBlock.ToolResultMessage.Builder.results(ToolResultBlock... results) Replaces all accumulated results with the given blocks.类型变量类型为ToolResultBlock的io.agentscope.core.message中的方法参数修饰符和类型方法说明ToolResultMessage.Builder.results(List<ToolResultBlock> results) Replaces all accumulated results with the given list.参数类型为ToolResultBlock的io.agentscope.core.message中的构造器类型变量类型为ToolResultBlock的io.agentscope.core.message中的构造器参数 -
io.agentscope.core.tool中ToolResultBlock的使用
修饰符和类型方法说明Convert tool call result to ToolResultBlock.protected ToolResultBlockDefaultToolResultConverter.handleNull()Handle null result.protected ToolResultBlockDefaultToolResultConverter.handleVoid()Handle void return type.protected ToolResultBlockSerialize result to JSON string with schema.返回变量类型为ToolResultBlock的类型的io.agentscope.core.tool中的方法修饰符和类型方法说明reactor.core.publisher.Mono<ToolResultBlock> AgentTool.callAsync(ToolCallParam param) Execute the tool with the given parameters (asynchronous).reactor.core.publisher.Mono<ToolResultBlock> SchemaOnlyTool.callAsync(ToolCallParam param) Throws a ToolSuspendException to signal that this tool requires external execution.reactor.core.publisher.Mono<ToolResultBlock> ToolBase.callAsync(ToolCallParam param) Default tool invocation.reactor.core.publisher.Mono<ToolResultBlock> Toolkit.callTool(ToolCallParam param) Execute a tool with the given parameters.reactor.core.publisher.Mono<List<ToolResultBlock>> Toolkit.callTools(List<ToolUseBlock> toolCalls, ExecutionConfig agentExecutionConfig, Agent agent, RuntimeContext agentRuntimeContext) Execute multiple tools asynchronously with agent-level context (internal use by ReActAgent).参数类型为ToolResultBlock的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.voidNoOpToolEmitter.emit(ToolResultBlock chunk) Silently discards the emitted chunk without performing any action.voidToolEmitter.emit(ToolResultBlock chunk) Emit a streaming response chunk during tool execution.类型变量类型为ToolResultBlock的io.agentscope.core.tool中的方法参数修饰符和类型方法说明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.tool.coding中ToolResultBlock的使用
返回变量类型为ToolResultBlock的类型的io.agentscope.core.tool.coding中的方法修饰符和类型方法说明reactor.core.publisher.Mono<ToolResultBlock> ShellCommandTool.callAsync(ToolCallParam param) reactor.core.publisher.Mono<ToolResultBlock> ShellCommandTool.executeShellCommand(String command, Integer timeout) Execute a shell command and return the return code, standard output, and standard error within tags.reactor.core.publisher.Mono<ToolResultBlock> ShellCommandTool.executeShellCommand(String command, Integer timeout, Charset overrideCharset) Execute a shell command and return the return code, standard output, and standard error within tags. -
io.agentscope.core.tool.file中ToolResultBlock的使用
返回变量类型为ToolResultBlock的类型的io.agentscope.core.tool.file中的方法修饰符和类型方法说明reactor.core.publisher.Mono<ToolResultBlock> WriteFileTool.insertTextFile(String filePath, String content, Integer lineNumber) Insert content at the specified line number in a text file.reactor.core.publisher.Mono<ToolResultBlock> ReadFileTool.listDirectory(String dirPath) List files and directories in the specified directory.reactor.core.publisher.Mono<ToolResultBlock> ReadFileTool.viewTextFile(String filePath, String ranges) View the file content in the specified range with line numbers.reactor.core.publisher.Mono<ToolResultBlock> WriteFileTool.writeTextFile(String filePath, String content, String ranges) Create/Replace/Overwrite content in a text file. -
io.agentscope.core.tool.mcp中ToolResultBlock的使用
修饰符和类型方法说明static ToolResultBlockMcpContentConverter.convertCallToolResult(io.modelcontextprotocol.spec.McpSchema.CallToolResult mcpResult) Converts an MCP CallToolResult to an AgentScope ToolResultBlock.返回变量类型为ToolResultBlock的类型的io.agentscope.core.tool.mcp中的方法修饰符和类型方法说明reactor.core.publisher.Mono<ToolResultBlock> McpTool.callAsync(ToolCallParam param) Executes this MCP tool asynchronously with the given parameters. -
io.agentscope.core.tool.subagent中ToolResultBlock的使用
返回变量类型为ToolResultBlock的类型的io.agentscope.core.tool.subagent中的方法修饰符和类型方法说明reactor.core.publisher.Mono<ToolResultBlock> SubAgentTool.callAsync(ToolCallParam param) -
io.agentscope.core.tracing中ToolResultBlock的使用
返回变量类型为ToolResultBlock的类型的io.agentscope.core.tracing中的方法修饰符和类型方法说明default reactor.core.publisher.Mono<ToolResultBlock> Tracer.callTool(Toolkit toolkit, ToolCallParam toolCallParam, Supplier<reactor.core.publisher.Mono<ToolResultBlock>> toolKitCall) 已过时, 待删除: 此 API 元素将从以后的版本中删除。类型变量类型为ToolResultBlock的io.agentscope.core.tracing中的方法参数修饰符和类型方法说明default reactor.core.publisher.Mono<ToolResultBlock> Tracer.callTool(Toolkit toolkit, ToolCallParam toolCallParam, Supplier<reactor.core.publisher.Mono<ToolResultBlock>> toolKitCall) 已过时, 待删除: 此 API 元素将从以后的版本中删除。