AS AgentScopeAPI 手册 / API Reference

Builder

public static final class Builder
源码Source io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:230–271

构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.judge.jev.example 包。核心成员包括 choice、choices、instructions、confidenceThreshold、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 choice(String name, Model model, String criteria)
设置选项。
Performs the choice operation.
public Builder choices(Map<String, ModelChoice> choices)
设置该配置项。
Performs the choices operation.
public Builder instructions(String instructions)
设置指令。
Performs the instructions operation.
public Builder confidenceThreshold(double confidenceThreshold)
设置置信度阈值。
Performs the confidence threshold operation.
public Builder failOpen(boolean failOpen)
设置该配置项。
Performs the fail open operation.
public JevModelRouterMiddleware build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

choice

public Builder choice(String name, Model model, String criteria)

设置选项。

Performs the choice operation.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
modelModel模型实例(类型 `Model`)。The model.
criteriaString标准(类型 `String`)。The criteria.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:241–245

choices

public Builder choices(Map<String, ModelChoice> choices)

设置该配置项。

Performs the choices operation.

参数Parameters
名称Name类型Type说明Description
choicesMap<String, ModelChoice>choices(类型 `Map`)。The choices.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:247–251

instructions

public Builder instructions(String instructions)

设置指令。

Performs the instructions operation.

参数Parameters
名称Name类型Type说明Description
instructionsString指令(类型 `String`)。The instructions.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:253–256

confidenceThreshold

public Builder confidenceThreshold(double confidenceThreshold)

设置置信度阈值。

Performs the confidence threshold operation.

参数Parameters
名称Name类型Type说明Description
confidenceThresholddouble置信度阈值(类型 `double`)。The confidence threshold.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:258–261

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/JevModelRouterMiddleware.java:263–266

build

public JevModelRouterMiddleware build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns JevModelRouterMiddleware
返回JevModelRouterMiddleware。Returns jev model router middleware.
源码Source io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:268–270
基于官方固定版本源码静态生成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.