AS AgentScopeAPI 手册 / API Reference

SelectionDecision

public class SelectionDecision
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:29–113

Selection 决策,对智能体行为进行评测、追踪与可观测性分析。位于 io.agentscope.core.training.strategy 包。核心成员包括 accept、reject、shouldTrain、getReason、getLabels、getMetadata。

Selection Decision - Selection decision result

Encapsulates the decision of whether to train, along with related metadata (labels, reason, etc.)

方法摘要Method Summary

方法Method说明Description
public static SelectionDecision accept(String reason)
static
设置该参数。
Create a "should train" decision
public static SelectionDecision accept(String reason, String... labels)
static
执行 `accept` 方法。
Create a "should train" decision with labels
public static SelectionDecision accept(String reason, List<String> labels, Map<String, Object> metadata)
static
执行 `accept` 方法。
Create a "should train" decision with labels and metadata
public static SelectionDecision reject(String reason)
static
设置拒绝。
Create a "should not train" decision
public boolean shouldTrain()
返回 `shouldTrain` 结果。
Returns the should train.
public String getReason()
获取推理。
Returns the reason.
public List<String> getLabels()
获取 `getLabels`。
Returns the labels.
public Map<String, Object> getMetadata()
获取元数据。
Returns the metadata.
public String toString()
返回 `toString` 结果。
Returns the to string.

方法详情Method Detail

accept

public static SelectionDecision accept(String reason)
static

设置该参数。

Create a "should train" decision

参数Parameters
名称Name类型Type说明Description
reasonString原因(类型 `String`)。The reason.
返回Returns SelectionDecision
返回SelectionDecision。Returns selection decision.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:56–58

accept

public static SelectionDecision accept(String reason, String... labels)
static

执行 accept 方法。

Create a "should train" decision with labels

参数Parameters
名称Name类型Type说明Description
reasonString原因(类型 `String`)。The reason.
labels varargsString...labels(类型 `String...`)。The labels.
返回Returns SelectionDecision
返回SelectionDecision。Returns selection decision.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:63–65

accept

public static SelectionDecision accept(String reason, List<String> labels, Map<String, Object> metadata)
static

执行 accept 方法。

Create a "should train" decision with labels and metadata

参数Parameters
名称Name类型Type说明Description
reasonString原因(类型 `String`)。The reason.
labelsList<String>labels(类型 `List`)。The labels.
metadataMap<String, Object>元数据(类型 `Map`)。The metadata.
返回Returns SelectionDecision
返回SelectionDecision。Returns selection decision.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:70–73

reject

public static SelectionDecision reject(String reason)
static

设置拒绝。

Create a "should not train" decision

参数Parameters
名称Name类型Type说明Description
reasonString原因(类型 `String`)。The reason.
返回Returns SelectionDecision
返回SelectionDecision。Returns selection decision.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:78–80

shouldTrain

public boolean shouldTrain()

返回 shouldTrain 结果。

Returns the should train.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:83–85

getReason

public String getReason()

获取推理。

Returns the reason.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:87–89

getLabels

public List<String> getLabels()

获取 getLabels。

Returns the labels.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:91–93

getMetadata

public Map<String, Object> getMetadata()

获取元数据。

Returns the metadata.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:95–97

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/training/strategy/SelectionDecision.java:99–112
基于官方固定版本源码静态生成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.