AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:117–151

ToolResultEvictionConfig的构建器。位于 io.agentscope.harness.agent.memory.compaction 包。核心成员包括 maxResultChars、previewChars、evictionPath、excludedToolNames、build。

Builder for ToolResultEvictionConfig.

方法摘要Method Summary

方法Method说明Description
public Builder maxResultChars(int maxResultChars)
设置最大结果字符数。
Sets the character threshold above which eviction is triggered.
public Builder previewChars(int previewChars)
设置预览字符数。
Sets how many characters to include in the head/tail preview.
public Builder evictionPath(String evictionPath)
设置淘汰路径。
Sets the root filesystem path prefix for evicted files.
public Builder excludedToolNames(Set<String> excludedToolNames)
设置该配置项。
Replaces the default set of excluded tool names.
public ToolResultEvictionConfig build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

maxResultChars

public Builder maxResultChars(int maxResultChars)

设置最大结果字符数。

Sets the character threshold above which eviction is triggered.

参数Parameters
名称Name类型Type说明Description
maxResultCharsint最大结果字符数(类型 `int`)。The max result chars.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:125–128

previewChars

public Builder previewChars(int previewChars)

设置预览字符数。

Sets how many characters to include in the head/tail preview.

参数Parameters
名称Name类型Type说明Description
previewCharsint预览字符数(类型 `int`)。The preview chars.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:131–134

evictionPath

public Builder evictionPath(String evictionPath)

设置淘汰路径。

Sets the root filesystem path prefix for evicted files.

参数Parameters
名称Name类型Type说明Description
evictionPathString淘汰路径(类型 `String`)。The eviction path.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:137–140

excludedToolNames

public Builder excludedToolNames(Set<String> excludedToolNames)

设置该配置项。

Replaces the default set of excluded tool names.

参数Parameters
名称Name类型Type说明Description
excludedToolNamesSet<String>excluded 工具 Names(类型 `Set`)。The excluded tool names.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:143–146

build

public ToolResultEvictionConfig build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns ToolResultEvictionConfig
返回ToolResultEvictionConfig。Returns tool result eviction config.
源码Source io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:148–150
基于官方固定版本源码静态生成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.