JevToolSelectionMiddleware
public final class JevToolSelectionMiddleware implements MiddlewareBase
io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:54–271Jev 工具 Selection 中间件,在智能体执行流程中提供横切扩展。位于 io.agentscope.extensions.judge.jev.example 包,实现 MiddlewareBase。核心成员包括 builder、order、onReasoning、DEFAULT_ALWAYS_INCLUDE_TOOLS。
Reduces the tool schema list sent to the primary model.
Always-included tools are preserved. Optional tools are ranked by Jev and only those with a
probability above the synthetic "none" option are kept, up to maxTools.
The filter runs in #onReasoning on every reasoning step, so it re-selects tools as
the conversation grows. Tool sets larger than the Jev choice limit are chunked, each chunk's
winner is shortlisted, and the shortlist is reranked in a second request. When Jev fails and
failOpen is set (the default), the original tool list is kept.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.extensions.judge.jev.example that evaluates agent behaviour and records tracing and telemetry data. |
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
DEFAULT_ALWAYS_INCLUDE_TOOLSstaticfinal | Set<String> | 默认 ALWAYS INCLUDE 工具字段。 The DEFAULT ALWAYS INCLUDE TOOLS field. |
方法摘要Method Summary
字段详情Field Detail
DEFAULT_ALWAYS_INCLUDE_TOOLS
public static final Set<String> DEFAULT_ALWAYS_INCLUDE_TOOLS
默认 ALWAYS INCLUDE 工具字段。声明为 public static final Set DEFAULT_ALWAYS_INCLUDE_TOOLS。
The DEFAULT ALWAYS INCLUDE TOOLS field.
io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:56–57方法详情Method Detail
builder
public static Builder builder(JevClient client)
返回构建器实例。
Performs the builder operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
client | JevClient | 客户端(类型 `JevClient`)。The client. |
Builderio/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:74–77builder
public static Builder builder(Function<SystemOneRequest, Mono<SystemOneResult>> jevCall)
返回构建器实例。
Creates a builder from a Jev call function.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
jevCall | Function<SystemOneRequest, Mono<SystemOneResult>> | jev 调用(类型 `Function >`)。The jev call. |
Builderio/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:83–85order
public int order()
返回顺序。
Returns the order.
intio/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:87–90onReasoning
public Flux<AgentEvent> onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, Flux<AgentEvent>> next)
处理推理事件。
Performs the on reasoning operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
ctx | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。The ctx. |
input | ReasoningInput | 输入消息(类型 `ReasoningInput`)。The input. |
next | Function<ReasoningInput, Flux<AgentEvent>> | 下一个(类型 `Function >`)。The next. |
Flux<AgentEvent>io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:92–134嵌套类详情Nested Class Detail
Builder
public static final class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.judge.jev.example 包。核心成员包括 alwaysIncludeTools、maxTools、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.