Builder
public static final class Builder
源码Source
io/agentscope/core/permission/PermissionDecision.java:168–205构建器,用于构建并配置目标实例。位于 io.agentscope.core.permission 包。核心成员包括 behavior、message、decisionReason、updatedInput、suggestedRules、build。
A class in io.agentscope.core.permission that drives agent reasoning, tool calls and conversation execution. Declared in io.agentscope.core.permission.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder behavior(PermissionBehavior behavior) | 设置行为。 Performs the behavior operation. |
public Builder message(String message) | 设置消息。 Performs the message operation. |
public Builder decisionReason(String decisionReason) | 设置决策推理。 Performs the decision reason operation. |
public Builder updatedInput(Map<String, Object> updatedInput) | 设置已更新输入。 Performs the updated input operation. |
public Builder suggestedRules(List<PermissionRule> suggestedRules) | 设置该配置项。 Performs the suggested rules operation. |
public PermissionDecision build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
behavior
public Builder behavior(PermissionBehavior behavior)
设置行为。
Performs the behavior operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
behavior | PermissionBehavior | 行为(类型 `PermissionBehavior`)。The behavior. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/permission/PermissionDecision.java:177–180message
public Builder message(String message)
设置消息。
Performs the message operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/permission/PermissionDecision.java:182–185decisionReason
public Builder decisionReason(String decisionReason)
设置决策推理。
Performs the decision reason operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
decisionReason | String | 决策推理(类型 `String`)。The decision reason. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/permission/PermissionDecision.java:187–190updatedInput
public Builder updatedInput(Map<String, Object> updatedInput)
设置已更新输入。
Performs the updated input operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
updatedInput | Map<String, Object> | 已更新输入(类型 `Map`)。The updated input. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/permission/PermissionDecision.java:192–195suggestedRules
public Builder suggestedRules(List<PermissionRule> suggestedRules)
设置该配置项。
Performs the suggested rules operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
suggestedRules | List<PermissionRule> | suggested 规则(类型 `List`)。The suggested rules. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/permission/PermissionDecision.java:197–200build
public PermissionDecision build()
构建并返回最终实例。
Creates and returns an instance.
PermissionDecision返回PermissionDecision。Returns permission decision.
源码Source
io/agentscope/core/permission/PermissionDecision.java:202–204