ToolExecutionContextProvider
@Deprecated @FunctionalInterface public interface ToolExecutionContextProvider
源码Source
io/agentscope/core/tool/ToolExecutionContextProvider.java:118–135定义工具执行上下文提供者契约的接口。位于 io.agentscope.core.tool 包。核心成员包括 resolveContext。
@deprecated Part of the {@link ToolExecutionContext} layer which is superseded by {@link io.agentscope.core.agent.RuntimeContext}. Declared in io.agentscope.core.tool.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public T T resolveContext(Class<T> targetType) | 解析上下文。 Resolves a context instance of the specified type. |
方法详情Method Detail
resolveContext
public T T resolveContext(Class<T> targetType)
解析上下文。
Resolves a context instance of the specified type.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
targetType | Class<T> | 目标类型到解析(ToolExecutionContext 或自定义 POJO)。The target type to resolve (ToolExecutionContext or custom POJO) |
T返回T。The resolved context instance, or null if not available
源码Source
io/agentscope/core/tool/ToolExecutionContextProvider.java:134