AS AgentScopeAPI 手册 / API Reference

SplitStrategy

public enum SplitStrategy
源码Source io/agentscope/core/rag/reader/SplitStrategy.java:29–63

定义已拆分 Strategy相关取值的枚举。位于 io.agentscope.core.rag.reader 包。核心成员包括 CHARACTER、PARAGRAPH、TOKEN、SEMANTIC。

Strategy for splitting text into chunks.

Different strategies are suitable for different types of content:

  • CHARACTER: Split by character count (simple, fast, may break words)

  • PARAGRAPH: Split by paragraphs (preserves semantic units)

  • TOKEN: Split by token count (approximates LLM token limits)

  • SEMANTIC: Split by semantic boundaries (requires NLP, not yet implemented)

枚举常量摘要Enum Constant Summary

常量Constant说明Description
CHARACTER
执行 `CHARACTER` 方法。
Split text by character count.
PARAGRAPH
执行 `PARAGRAPH` 方法。
Split text by paragraphs.
TOKEN
执行令牌相关操作。
Split text by token count (approximate).
SEMANTIC
执行 `SEMANTIC` 方法。
Split text by semantic boundaries.

枚举常量详情Enum Constant Detail

CHARACTER

CHARACTER
staticfinal

执行 CHARACTER 方法。

Split text by character count.

源码Source io/agentscope/core/rag/reader/SplitStrategy.java:36

PARAGRAPH

PARAGRAPH
staticfinal

执行 PARAGRAPH 方法。

Split text by paragraphs.

源码Source io/agentscope/core/rag/reader/SplitStrategy.java:44

TOKEN

TOKEN
staticfinal

执行令牌相关操作。

Split text by token count (approximate).

源码Source io/agentscope/core/rag/reader/SplitStrategy.java:53

SEMANTIC

SEMANTIC
staticfinal

执行 SEMANTIC 方法。

Split text by semantic boundaries.

源码Source io/agentscope/core/rag/reader/SplitStrategy.java:62
基于官方固定版本源码静态生成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.