AS AgentScopeAPI 手册 / API Reference

RemoteWrapper

@Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface RemoteWrapper
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteWrapper.java:28–47

用于标记远程包装器相关元数据的注解。位于 io.agentscope.runtime.sandbox.manager.remote 包。核心成员包括 method、successKey、path。

Annotation to mark methods that can be executed both locally and remotely. When a SandboxService is configured with a remote base URL, methods annotated with @RemoteWrapper will automatically make HTTP requests to the remote server

注解元素摘要Annotation Element Summary

元素Element类型Type默认值Default说明Description
methodRequestMethodRequestMethod.POST
用于远程调用的HTTP 方法到使用。
HTTP method to use for the remote call
successKeyString"data"
返回成功键。
Key in the response JSON that contains the actual data If empty, the whole response will be returned
pathString""
用于端点的自定义路径。
Custom path for the endpoint.

注解元素详情Annotation Element Detail

method

public RequestMethod method()

用于远程调用的HTTP 方法到使用。

HTTP method to use for the remote call

返回Returns RequestMethod
返回RequestMethod。Returns request method.
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteWrapper.java:35

successKey

public String successKey()

返回成功键。

Key in the response JSON that contains the actual data If empty, the whole response will be returned

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteWrapper.java:41

path

public String path()

用于端点的自定义路径。

Custom path for the endpoint.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteWrapper.java:46
基于官方固定版本源码静态生成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.