AS AgentScopeAPI 手册 / API Reference

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
toolNameString工具名称(类型 `String`)。The tool name.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:304–308

guardedTools

public Builder guardedTools(Set<String> toolNames)

设置该配置项。

Performs the guarded tools operation.

参数Parameters
名称Name类型Type说明Description
toolNamesSet<String>工具 Names(类型 `Set`)。The tool names.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:310–316

safetyThreshold

public Builder safetyThreshold(double safetyThreshold)

设置该配置项。

Minimum P(safe) required for a guarded tool call to pass.

参数Parameters
名称Name类型Type说明Description
safetyThresholddoublesafety 阈值(类型 `double`)。threshold in [0, 1]; defaults to `0.5`
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:324–327

denyMessage

public Builder denyMessage(String denyMessage)

设置拒绝消息。

Performs the deny message operation.

参数Parameters
名称Name类型Type说明Description
denyMessageString拒绝消息(类型 `String`)。The deny message.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:329–332

failOpen

public Builder failOpen(boolean failOpen)

设置该配置项。

Performs the fail open operation.

参数Parameters
名称Name类型Type说明Description
failOpenbooleanfail 打开(类型 `boolean`)。The fail open.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:334–337

build

public JevAutoModeMiddleware build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns JevAutoModeMiddleware
返回JevAutoModeMiddleware。Returns jev auto mode middleware.
源码Source io/agentscope/extensions/judge/jev/example/JevAutoModeMiddleware.java:339–341
基于官方固定版本源码静态生成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.