AS AgentScopeAPI 手册 / API Reference

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
targetTypeClass<T>目标类型到解析(ToolExecutionContext 或自定义 POJO)。The target type to resolve (ToolExecutionContext or custom POJO)
返回Returns T
返回T。The resolved context instance, or null if not available
源码Source io/agentscope/core/tool/ToolExecutionContextProvider.java:134
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.