RuntimeFunctionToolCallback
public class RuntimeFunctionToolCallback<I, O> implements ToolCallback
io/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:57–204运行时函数工具回调,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.engine.agents.saa 包,实现 ToolCallback。核心成员包括 getToolDefinition、getToolMetadata、getToolFunction、call、toString、builder。
A class in io.agentscope.runtime.engine.agents.saa that deploys, schedules and serves agents. Declared in io.agentscope.runtime.engine.agents.saa. Implements ToolCallback.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.runtime.engine.agents.saa that deploys, schedules and serves agents. |
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public ToolDefinition getToolDefinition() | 获取工具定义。 Returns the tool definition. |
public ToolMetadata getToolMetadata() | 获取工具元数据。 Returns the tool metadata. |
public SandboxAwareTool<I, O> getToolFunction() | 获取工具函数。 Returns the tool function. |
public String call(String toolInput) | 向智能体发送输入并返回最终回复。 Performs the call operation. |
public String call(String toolInput, ToolContext toolContext) | 向智能体发送输入并返回最终回复。 Performs the call operation. |
public String toString() | 返回 `toString` 结果。 Returns the to string. |
public static I O RuntimeFunctionToolCallback.Builder<I, O> builder(String name, SandboxAwareTool<I, O> function)static | 构建`RuntimeFunctionToolCallback`来自`BiFunction`。 Build a `RuntimeFunctionToolCallback` from a `BiFunction`. |
构造器详情Constructor Detail
RuntimeFunctionToolCallback
public RuntimeFunctionToolCallback(ToolDefinition toolDefinition, ToolMetadata toolMetadata, Type toolInputType, SandboxAwareTool<I, O> toolFunction, ToolCallResultConverter toolCallResultConverter)
初始化 RuntimeFunctionToolCallback 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolDefinition | ToolDefinition | 工具定义(类型 `ToolDefinition`)。The tool definition. |
toolMetadata | ToolMetadata | 工具元数据(类型 `ToolMetadata`)。The tool metadata. |
toolInputType | Type | 工具输入类型(类型 `Type`)。The tool input type. |
toolFunction | SandboxAwareTool<I, O> | 工具函数(类型 `SandboxAwareTool`)。The tool function. |
toolCallResultConverter | ToolCallResultConverter | 工具调用结果转换器(类型 `ToolCallResultConverter`)。The tool call result converter. |
io/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:75–86方法详情Method Detail
getToolDefinition
public ToolDefinition getToolDefinition()
获取工具定义。
Returns the tool definition.
ToolDefinitionio/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:88–91getToolMetadata
public ToolMetadata getToolMetadata()
获取工具元数据。
Returns the tool metadata.
ToolMetadataio/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:93–96getToolFunction
public SandboxAwareTool<I, O> getToolFunction()
获取工具函数。
Returns the tool function.
SandboxAwareTool<I, O>io/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:98–100call
public String call(String toolInput)
向智能体发送输入并返回最终回复。
Performs the call operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolInput | String | 工具输入(类型 `String`)。The tool input. |
Stringio/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:102–105call
public String call(String toolInput, ToolContext toolContext)
向智能体发送输入并返回最终回复。
Performs the call operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolInput | String | 工具输入(类型 `String`)。The tool input. |
toolContext | ToolContext | 工具上下文(类型 `ToolContext`)。The tool context. |
Stringio/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:107–119toString
public String toString()
返回 toString 结果。
Returns the to string.
Stringio/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:121–125builder
public static I O RuntimeFunctionToolCallback.Builder<I, O> builder(String name, SandboxAwareTool<I, O> function)
构建RuntimeFunctionToolCallback来自BiFunction。
Build a RuntimeFunctionToolCallback from a BiFunction.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
function | SandboxAwareTool<I, O> | 函数(类型 `SandboxAwareTool`)。The function. |
RuntimeFunctionToolCallback.Builder<I, O>io/agentscope/runtime/engine/agents/saa/RuntimeFunctionToolCallback.java:130–132嵌套类详情Nested Class Detail
Builder
public static final class Builder<I, O>构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.engine.agents.saa 包。核心成员包括 description、inputSchema、inputType、toolMetadata、toolCallResultConverter、build。
A class in io.agentscope.runtime.engine.agents.saa that deploys, schedules and serves agents. Declared in io.agentscope.runtime.engine.agents.saa.