Builder
public static class Builder
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:277–331RunAgentInput的构建器。位于 io.agentscope.core.agui.model 包。核心成员包括 threadId、runId、messages、tools、context、state。
Builder for RunAgentInput.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder threadId(String threadId) | 设置会话线程标识。 Performs the thread id operation. |
public Builder runId(String runId) | 设置运行标识。 Runs the id. |
public Builder messages(List<AguiMessage> messages) | 设置消息。 Performs the messages operation. |
public Builder tools(List<AguiTool> tools) | 设置工具。 Performs the tools operation. |
public Builder context(List<AguiContext> context) | 设置上下文。 Performs the context operation. |
public Builder state(Map<String, Object> state) | 设置状态。 Performs the state operation. |
public Builder forwardedProps(Map<String, Object> forwardedProps) | 设置该配置项。 Performs the forwarded props operation. |
public Builder resume(List<AguiResume> resume) | 设置恢复。 Performs the resume operation. |
public RunAgentInput build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
threadId
public Builder threadId(String threadId)
设置会话线程标识。
Performs the thread id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
threadId | String | 会话线程标识(类型 `String`)。The thread id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:287–290runId
public Builder runId(String runId)
设置运行标识。
Runs the id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runId | String | 运行标识(类型 `String`)。The run id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:292–295messages
public Builder messages(List<AguiMessage> messages)
设置消息。
Performs the messages operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
messages | List<AguiMessage> | 消息列表(类型 `List`)。The messages. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:297–300tools
public Builder tools(List<AguiTool> tools)
设置工具。
Performs the tools operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tools | List<AguiTool> | 工具列表(类型 `List`)。The tools. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:302–305context
public Builder context(List<AguiContext> context)
设置上下文。
Performs the context operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | List<AguiContext> | 上下文(类型 `List`)。The context. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:307–310state
public Builder state(Map<String, Object> state)
设置状态。
Performs the state operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
state | Map<String, Object> | 状态对象(类型 `Map`)。The state. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:312–315forwardedProps
public Builder forwardedProps(Map<String, Object> forwardedProps)
设置该配置项。
Performs the forwarded props operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
forwardedProps | Map<String, Object> | forwarded Props(类型 `Map`)。The forwarded props. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:317–320resume
public Builder resume(List<AguiResume> resume)
设置恢复。
Performs the resume operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
resume | List<AguiResume> | 恢复(类型 `List`)。The resume. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:322–325build
public RunAgentInput build()
构建并返回最终实例。
Creates and returns an instance.
RunAgentInput返回RunAgentInput。Returns run agent input.
源码Source
io/agentscope/core/agui/model/RunAgentInput.java:327–330