Builder
public static final class Builder<T>
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:146–206AguiRuntimeContextRequest的构建器。位于 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 |
|---|---|---|
input | RunAgentInput | 输入消息(类型 `RunAgentInput`)。The input. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:158–161headerAgentId
public Builder<T> headerAgentId(String headerAgentId)
设置请求头智能体标识。
Performs the header agent id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
headerAgentId | String | 请求头智能体标识(类型 `String`)。The header agent id. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:163–166pathAgentId
public Builder<T> pathAgentId(String pathAgentId)
设置路径智能体标识。
Performs the path agent id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
pathAgentId | String | 路径智能体标识(类型 `String`)。The path agent id. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:168–171transport
public Builder<T> transport(Transport transport)
设置传输层。
Performs the transport operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
transport | Transport | 传输层(类型 `Transport`)。The transport. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:173–176method
public Builder<T> method(String method)
设置方法。
Performs the method operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
method | String | 方法(类型 `String`)。The method. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:178–181path
public Builder<T> path(String path)
设置路径。
Performs the path operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:183–186headers
public Builder<T> headers(Map<String, List<String>> headers)
设置请求头。
Performs the headers operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
headers | Map<String, List<String>> | 请求头(类型 `Map >`)。The headers. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:188–191queryParams
public Builder<T> queryParams(Map<String, List<String>> queryParams)
设置查询参数。
Queries the params.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
queryParams | Map<String, List<String>> | 查询参数(类型 `Map >`)。The query params. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:193–196nativeRequest
public Builder<T> nativeRequest(T nativeRequest)
设置原生请求。
Performs the native request operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
nativeRequest | T | 原生请求(类型 `T`)。The native request. |
Builder<T>返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:198–201build
public AguiRuntimeContextRequest<T> build()
构建并返回最终实例。
Creates and returns an instance.
AguiRuntimeContextRequest<T>返回AguiRuntimeContextRequest。Returns agui runtime context request.
源码Source
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:203–205