AS AgentScopeAPI 手册 / API Reference

ReactConfig

@JsonIgnoreProperties(ignoreUnknown = true) public record ReactConfig( @JsonProperty("max_iters") int maxIters, @JsonProperty("stop_on_reject") boolean stopOnReject)
源码Source io/agentscope/core/agent/config/ReactConfig.java:28–55

承载 ReAct 配置数据的记录类型。位于 io.agentscope.core.agent.config 包。核心成员包括 maxIters、stopOnReject、defaults、ReactConfig、DEFAULT_MAX_ITERS、DEFAULT_STOP_ON_REJECT。

Reasoning-loop configuration. #maxIters() caps the number of reasoning→acting iterations within a single reply; #stopOnReject() controls whether a permission rejection of any tool call terminates the loop (instead of feeding the rejection back into the next reasoning round).

记录组件摘要Record Component Summary

组件Component类型Type说明Description
maxItersint
执行最大迭代次数相关操作。
Performs the max iters operation.
stopOnRejectboolean
停止On 拒绝。
Stops the on reject.

字段摘要Field Summary

字段Field类型Type说明Description
DEFAULT_MAX_ITERS
staticfinal
int
默认最大迭代次数字段。
The DEFAULT MAX ITERS field.
DEFAULT_STOP_ON_REJECT
staticfinal
boolean
默认停止 ON 拒绝字段。
The DEFAULT STOP ON REJECT field.

构造器摘要Constructor Summary

构造器Constructor说明Description
public ReactConfig(int maxIters, boolean stopOnReject)
初始化 `ReactConfig` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public static ReactConfig defaults()
static
返回 `defaults` 结果。
Returns a config initialised to all default values.

记录组件详情Record Component Detail

maxIters

int maxIters

执行最大迭代次数相关操作。

Performs the max iters operation.

源码Source io/agentscope/core/agent/config/ReactConfig.java:28–55

stopOnReject

boolean stopOnReject

停止On 拒绝。

Stops the on reject.

源码Source io/agentscope/core/agent/config/ReactConfig.java:28–55

字段详情Field Detail

DEFAULT_MAX_ITERS

public static final int DEFAULT_MAX_ITERS
staticfinal

默认最大迭代次数字段。声明为 public static final int DEFAULT_MAX_ITERS。

The DEFAULT MAX ITERS field.

源码Source io/agentscope/core/agent/config/ReactConfig.java:33

DEFAULT_STOP_ON_REJECT

public static final boolean DEFAULT_STOP_ON_REJECT
staticfinal

默认停止 ON 拒绝字段。声明为 public static final boolean DEFAULT_STOP_ON_REJECT。

The DEFAULT STOP ON REJECT field.

源码Source io/agentscope/core/agent/config/ReactConfig.java:34

构造器详情Constructor Detail

ReactConfig

public ReactConfig(int maxIters, boolean stopOnReject)

初始化 ReactConfig 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
maxItersint最大迭代次数(类型 `int`)。The max iters.
stopOnRejectboolean停止 On 拒绝(类型 `boolean`)。The stop on reject.
源码Source io/agentscope/core/agent/config/ReactConfig.java:36–40

方法详情Method Detail

defaults

public static ReactConfig defaults()
static

返回 defaults 结果。

Returns a config initialised to all default values.

返回Returns ReactConfig
返回ReactConfig。Returns react config.
源码Source io/agentscope/core/agent/config/ReactConfig.java:43–45
基于官方固定版本源码静态生成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.