Class FileChunkingStrategyParam
-
- All Implemented Interfaces:
public final class FileChunkingStrategyParam
The chunking strategy used to chunk the file(s). If not set, will use the
auto
strategy. Only applicable iffile_ids
is non-empty.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
FileChunkingStrategyParam.Visitor
An interface that defines how to map each variant of FileChunkingStrategyParam to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<AutoFileChunkingStrategyParam>
auto()
The default strategy. final Optional<StaticFileChunkingStrategyObjectParam>
static_()
Customize your own chunking strategy by setting chunk size and chunk overlap. final Boolean
isAuto()
final Boolean
isStatic()
final AutoFileChunkingStrategyParam
asAuto()
The default strategy. final StaticFileChunkingStrategyObjectParam
asStatic()
Customize your own chunking strategy by setting chunk size and chunk overlap. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(FileChunkingStrategyParam.Visitor<T> visitor)
final FileChunkingStrategyParam
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static FileChunkingStrategyParam
ofAuto(AutoFileChunkingStrategyParam auto)
The default strategy. final static FileChunkingStrategyParam
ofStatic(StaticFileChunkingStrategyObjectParam static_)
Customize your own chunking strategy by setting chunk size and chunk overlap. -
-
Method Detail
-
auto
final Optional<AutoFileChunkingStrategyParam> auto()
The default strategy. This strategy currently uses a
max_chunk_size_tokens
of800
andchunk_overlap_tokens
of400
.
-
static_
final Optional<StaticFileChunkingStrategyObjectParam> static_()
Customize your own chunking strategy by setting chunk size and chunk overlap.
-
asAuto
final AutoFileChunkingStrategyParam asAuto()
The default strategy. This strategy currently uses a
max_chunk_size_tokens
of800
andchunk_overlap_tokens
of400
.
-
asStatic
final StaticFileChunkingStrategyObjectParam asStatic()
Customize your own chunking strategy by setting chunk size and chunk overlap.
-
accept
final <T extends Any> T accept(FileChunkingStrategyParam.Visitor<T> visitor)
-
validate
final FileChunkingStrategyParam validate()
-
ofAuto
final static FileChunkingStrategyParam ofAuto(AutoFileChunkingStrategyParam auto)
The default strategy. This strategy currently uses a
max_chunk_size_tokens
of800
andchunk_overlap_tokens
of400
.
-
ofStatic
final static FileChunkingStrategyParam ofStatic(StaticFileChunkingStrategyObjectParam static_)
Customize your own chunking strategy by setting chunk size and chunk overlap.
-
-
-
-