Builder
public static final class Builder
源码Source
io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:293–342构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.judge.jev.example 包。核心成员包括 guardedTool、guardedTools、safetyThreshold、denyMessage、failOpen、build。
A class in io.agentscope.extensions.judge.jev.example that evaluates agent behaviour and records tracing and telemetry data. Declared in io.agentscope.extensions.judge.jev.example.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder guardedTool(String toolName) | 设置该配置项。 Performs the guarded tool operation. |
public Builder guardedTools(Set<String> toolNames) | 设置该配置项。 Performs the guarded tools operation. |
public Builder safetyThreshold(double safetyThreshold) | 设置该配置项。 Minimum P(safe) required for a guarded tool call to pass. |
public Builder denyMessage(String denyMessage) | 设置拒绝消息。 Performs the deny message operation. |
public Builder failOpen(boolean failOpen) | 设置该配置项。 Performs the fail open operation. |
public JevAutoModeMiddleware build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
guardedTool
public Builder guardedTool(String toolName)
设置该配置项。
Performs the guarded tool operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolName | String | 工具名称(类型 `String`)。The tool name. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:304–308guardedTools
public Builder guardedTools(Set<String> toolNames)
设置该配置项。
Performs the guarded tools operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolNames | Set<String> | 工具 Names(类型 `Set`)。The tool names. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:310–316safetyThreshold
public Builder safetyThreshold(double safetyThreshold)
设置该配置项。
Minimum P(safe) required for a guarded tool call to pass.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
safetyThreshold | double | safety 阈值(类型 `double`)。threshold in [0, 1]; defaults to `0.5` |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:324–327denyMessage
public Builder denyMessage(String denyMessage)
设置拒绝消息。
Performs the deny message operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
denyMessage | String | 拒绝消息(类型 `String`)。The deny message. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:329–332failOpen
public Builder failOpen(boolean failOpen)
设置该配置项。
Performs the fail open operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
failOpen | boolean | fail 打开(类型 `boolean`)。The fail open. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:334–337build
public JevAutoModeMiddleware build()
构建并返回最终实例。
Creates and returns an instance.
JevAutoModeMiddleware返回JevAutoModeMiddleware。Returns jev auto mode middleware.
源码Source
io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:339–341