AguiRuntimeContextRequest
public final class AguiRuntimeContextRequest<T>
io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:34–207AGUI 运行时上下文请求,在智能体、模型与前端之间传递结构化消息和事件。位于 io.agentscope.core.agui.runtime 包。核心成员包括 getInput、getHeaderAgentId、getPathAgentId、getTransport、getMethod、getPath。
Request-scoped data available when resolving an AG-UI io.agentscope.core.agent.RuntimeContext.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Transport | 枚举enum | 定义传输层相关取值的枚举。 Transport that received the AG-UI request. |
Builder | 类class | `AguiRuntimeContextRequest`的构建器。 Builder for `AguiRuntimeContextRequest`. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public RunAgentInput getInput() | 获取输入。 Returns the input. |
public String getHeaderAgentId() | 获取请求头智能体标识。 Returns the header agent id. |
public String getPathAgentId() | 获取路径智能体标识。 Returns the path agent id. |
public Transport getTransport() | 获取传输层。 Returns the transport. |
public String getMethod() | 获取方法。 Returns the method. |
public String getPath() | 获取路径。 Returns the path. |
public Map<String, List<String>> getHeaders() | 获取请求头。 Returns the headers. |
public String firstHeader(String name) | 设置第一个请求头。 Performs the first header operation. |
public Map<String, List<String>> getQueryParams() | 获取查询参数。 Returns the query params. |
public String firstQueryParam(String name) | 设置第一个查询参数。 Performs the first query param operation. |
public T getNativeRequest() | 获取原生请求。 Returns the native request. |
public static T Builder<T> builder()static | 返回构建器实例。 Returns the builder. |
方法详情Method Detail
getInput
public RunAgentInput getInput()
获取输入。
Returns the input.
RunAgentInputio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:65–67getHeaderAgentId
public String getHeaderAgentId()
获取请求头智能体标识。
Returns the header agent id.
Stringio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:69–71getPathAgentId
public String getPathAgentId()
获取路径智能体标识。
Returns the path agent id.
Stringio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:73–75getTransport
public Transport getTransport()
获取传输层。
Returns the transport.
Transportio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:77–79getMethod
public String getMethod()
获取方法。
Returns the method.
Stringio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:81–83getPath
public String getPath()
获取路径。
Returns the path.
Stringio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:85–87getHeaders
public Map<String, List<String>> getHeaders()
获取请求头。
Returns the headers.
Map<String, List<String>>io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:89–91firstHeader
public String firstHeader(String name)
设置第一个请求头。
Performs the first header operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
Stringio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:93–95getQueryParams
public Map<String, List<String>> getQueryParams()
获取查询参数。
Returns the query params.
Map<String, List<String>>io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:97–99firstQueryParam
public String firstQueryParam(String name)
设置第一个查询参数。
Performs the first query param operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
Stringio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:101–103getNativeRequest
public T getNativeRequest()
获取原生请求。
Returns the native request.
Tio/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:105–107builder
public static T Builder<T> builder()
返回构建器实例。
Returns the builder.
Builder<T>io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:109–111嵌套类详情Nested Class Detail
Transport
public enum Transport定义传输层相关取值的枚举。位于 io.agentscope.core.agui.runtime 包。核心成员包括 MVC、WEBFLUX、CUSTOM。
Transport that received the AG-UI request.
Builder
public static final class Builder<T>AguiRuntimeContextRequest的构建器。位于 io.agentscope.core.agui.runtime 包。核心成员包括 input、headerAgentId、pathAgentId、transport、method、path。
Builder for AguiRuntimeContextRequest.