AS AgentScopeAPI 手册 / API Reference

Builder

public static final class Builder<T>
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:146–206

AguiRuntimeContextRequest的构建器。位于 io.agentscope.core.agui.runtime 包。核心成员包括 input、headerAgentId、pathAgentId、transport、method、path。

Builder for AguiRuntimeContextRequest.

方法摘要Method Summary

方法Method说明Description
public Builder<T> input(RunAgentInput input)
设置输入。
Performs the input operation.
public Builder<T> headerAgentId(String headerAgentId)
设置请求头智能体标识。
Performs the header agent id operation.
public Builder<T> pathAgentId(String pathAgentId)
设置路径智能体标识。
Performs the path agent id operation.
public Builder<T> transport(Transport transport)
设置传输层。
Performs the transport operation.
public Builder<T> method(String method)
设置方法。
Performs the method operation.
public Builder<T> path(String path)
设置路径。
Performs the path operation.
public Builder<T> headers(Map<String, List<String>> headers)
设置请求头。
Performs the headers operation.
public Builder<T> queryParams(Map<String, List<String>> queryParams)
设置查询参数。
Queries the params.
public Builder<T> nativeRequest(T nativeRequest)
设置原生请求。
Performs the native request operation.
public AguiRuntimeContextRequest<T> build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

input

public Builder<T> input(RunAgentInput input)

设置输入。

Performs the input operation.

参数Parameters
名称Name类型Type说明Description
inputRunAgentInput输入消息(类型 `RunAgentInput`)。The input.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:158–161

headerAgentId

public Builder<T> headerAgentId(String headerAgentId)

设置请求头智能体标识。

Performs the header agent id operation.

参数Parameters
名称Name类型Type说明Description
headerAgentIdString请求头智能体标识(类型 `String`)。The header agent id.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:163–166

pathAgentId

public Builder<T> pathAgentId(String pathAgentId)

设置路径智能体标识。

Performs the path agent id operation.

参数Parameters
名称Name类型Type说明Description
pathAgentIdString路径智能体标识(类型 `String`)。The path agent id.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:168–171

transport

public Builder<T> transport(Transport transport)

设置传输层。

Performs the transport operation.

参数Parameters
名称Name类型Type说明Description
transportTransport传输层(类型 `Transport`)。The transport.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:173–176

method

public Builder<T> method(String method)

设置方法。

Performs the method operation.

参数Parameters
名称Name类型Type说明Description
methodString方法(类型 `String`)。The method.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:178–181

path

public Builder<T> path(String path)

设置路径。

Performs the path operation.

参数Parameters
名称Name类型Type说明Description
pathString路径(类型 `String`)。The path.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:183–186

headers

public Builder<T> headers(Map<String, List<String>> headers)

设置请求头。

Performs the headers operation.

参数Parameters
名称Name类型Type说明Description
headersMap<String, List<String>>请求头(类型 `Map >`)。The headers.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:188–191

queryParams

public Builder<T> queryParams(Map<String, List<String>> queryParams)

设置查询参数。

Queries the params.

参数Parameters
名称Name类型Type说明Description
queryParamsMap<String, List<String>>查询参数(类型 `Map >`)。The query params.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:193–196

nativeRequest

public Builder<T> nativeRequest(T nativeRequest)

设置原生请求。

Performs the native request operation.

参数Parameters
名称Name类型Type说明Description
nativeRequestT原生请求(类型 `T`)。The native request.
返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:198–201

build

public AguiRuntimeContextRequest<T> build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns AguiRuntimeContextRequest<T>
返回AguiRuntimeContextRequest。Returns agui runtime context request.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:203–205
基于官方固定版本源码静态生成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.