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 |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
model | Model | 模型实例(类型 `Model`)。The model. |
criteria | String | 标准(类型 `String`)。The criteria. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:241–245choices
public Builder choices(Map<String, ModelChoice> choices)
设置该配置项。
Performs the choices operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
choices | Map<String, ModelChoice> | choices(类型 `Map`)。The choices. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:247–251instructions
public Builder instructions(String instructions)
设置指令。
Performs the instructions operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
instructions | String | 指令(类型 `String`)。The instructions. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:253–256confidenceThreshold
public Builder confidenceThreshold(double confidenceThreshold)
设置置信度阈值。
Performs the confidence threshold operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
confidenceThreshold | double | 置信度阈值(类型 `double`)。The confidence threshold. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:258–261failOpen
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/JevModelRouterMiddleware.java:263–266build
public JevModelRouterMiddleware build()
构建并返回最终实例。
Creates and returns an instance.
JevModelRouterMiddleware返回JevModelRouterMiddleware。Returns jev model router middleware.
源码Source
io/agentscope/extensions/judge/jev/example/JevModelRouterMiddleware.java:268–270