AS AgentScopeAPI 手册 / API Reference

JevToolSelectionMiddleware

public final class JevToolSelectionMiddleware implements MiddlewareBase
源码Source io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:54–271

Jev 工具 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_TOOLS
staticfinal
Set<String>
默认 ALWAYS INCLUDE 工具字段。
The DEFAULT ALWAYS INCLUDE TOOLS field.

方法摘要Method Summary

方法Method说明Description
public static Builder builder(JevClient client)
static
返回构建器实例。
Performs the builder operation.
public static Builder builder(Function<SystemOneRequest, Mono<SystemOneResult>> jevCall)
static
返回构建器实例。
Creates a builder from a Jev call function.
public int order()
返回顺序。
Returns the order.
public Flux<AgentEvent> onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, Flux<AgentEvent>> next)
处理推理事件。
Performs the on reasoning operation.

字段详情Field Detail

DEFAULT_ALWAYS_INCLUDE_TOOLS

public static final Set<String> DEFAULT_ALWAYS_INCLUDE_TOOLS
staticfinal

默认 ALWAYS INCLUDE 工具字段。声明为 public static final Set DEFAULT_ALWAYS_INCLUDE_TOOLS。

The DEFAULT ALWAYS INCLUDE TOOLS field.

源码Source io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:56–57

方法详情Method Detail

builder

public static Builder builder(JevClient client)
static

返回构建器实例。

Performs the builder operation.

参数Parameters
名称Name类型Type说明Description
clientJevClient客户端(类型 `JevClient`)。The client.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:74–77

builder

public static Builder builder(Function<SystemOneRequest, Mono<SystemOneResult>> jevCall)
static

返回构建器实例。

Creates a builder from a Jev call function.

参数Parameters
名称Name类型Type说明Description
jevCallFunction<SystemOneRequest, Mono<SystemOneResult>>jev 调用(类型 `Function >`)。The jev call.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:83–85

order

public int order()

返回顺序。

Returns the order.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/judge/jev/example/JevToolSelectionMiddleware.java:87–90

onReasoning

public Flux<AgentEvent> onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, Flux<AgentEvent>> next)

处理推理事件。

Performs the on reasoning operation.

参数Parameters
名称Name类型Type说明Description
agentAgent智能体(类型 `Agent`)。The agent.
ctxRuntimeContext运行时上下文(类型 `RuntimeContext`)。The ctx.
inputReasoningInput输入消息(类型 `ReasoningInput`)。The input.
nextFunction<ReasoningInput, Flux<AgentEvent>>下一个(类型 `Function >`)。The next.
返回Returns Flux<AgentEvent>
返回Flux。Returns flux.
源码Source 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.

继承成员Inherited Members

继承自Methods inherited from MiddlewareBase
基于官方固定版本源码静态生成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.