Builder
public static class Builder
源码Source
io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:117–151ToolResultEvictionConfig的构建器。位于 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 |
|---|---|---|
maxResultChars | int | 最大结果字符数(类型 `int`)。The max result chars. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:125–128previewChars
public Builder previewChars(int previewChars)
设置预览字符数。
Sets how many characters to include in the head/tail preview.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
previewChars | int | 预览字符数(类型 `int`)。The preview chars. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:131–134evictionPath
public Builder evictionPath(String evictionPath)
设置淘汰路径。
Sets the root filesystem path prefix for evicted files.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
evictionPath | String | 淘汰路径(类型 `String`)。The eviction path. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:137–140excludedToolNames
public Builder excludedToolNames(Set<String> excludedToolNames)
设置该配置项。
Replaces the default set of excluded tool names.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
excludedToolNames | Set<String> | excluded 工具 Names(类型 `Set`)。The excluded tool names. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:143–146build
public ToolResultEvictionConfig build()
构建并返回最终实例。
Creates and returns an instance.
ToolResultEvictionConfig返回ToolResultEvictionConfig。Returns tool result eviction config.
源码Source
io/agentscope/harness/agent/memory/compaction/ToolResultEvictionConfig.java:148–150