AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/core/agui/model/RunAgentInput.java:277–331

RunAgentInput的构建器。位于 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
threadIdString会话线程标识(类型 `String`)。The thread id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:287–290

runId

public Builder runId(String runId)

设置运行标识。

Runs the id.

参数Parameters
名称Name类型Type说明Description
runIdString运行标识(类型 `String`)。The run id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:292–295

messages

public Builder messages(List<AguiMessage> messages)

设置消息。

Performs the messages operation.

参数Parameters
名称Name类型Type说明Description
messagesList<AguiMessage>消息列表(类型 `List`)。The messages.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:297–300

tools

public Builder tools(List<AguiTool> tools)

设置工具。

Performs the tools operation.

参数Parameters
名称Name类型Type说明Description
toolsList<AguiTool>工具列表(类型 `List`)。The tools.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:302–305

context

public Builder context(List<AguiContext> context)

设置上下文。

Performs the context operation.

参数Parameters
名称Name类型Type说明Description
contextList<AguiContext>上下文(类型 `List`)。The context.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:307–310

state

public Builder state(Map<String, Object> state)

设置状态。

Performs the state operation.

参数Parameters
名称Name类型Type说明Description
stateMap<String, Object>状态对象(类型 `Map`)。The state.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:312–315

forwardedProps

public Builder forwardedProps(Map<String, Object> forwardedProps)

设置该配置项。

Performs the forwarded props operation.

参数Parameters
名称Name类型Type说明Description
forwardedPropsMap<String, Object>forwarded Props(类型 `Map`)。The forwarded props.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:317–320

resume

public Builder resume(List<AguiResume> resume)

设置恢复。

Performs the resume operation.

参数Parameters
名称Name类型Type说明Description
resumeList<AguiResume>恢复(类型 `List`)。The resume.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:322–325

build

public RunAgentInput build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns RunAgentInput
返回RunAgentInput。Returns run agent input.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:327–330
基于官方固定版本源码静态生成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.