Class ThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy
-
- All Implemented Interfaces:
public final class ThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategyThe chunking strategy used to chunk the file(s). If not set, will use the
autostrategy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy.VisitorAn interface that defines how to map each variant of ChunkingStrategy to a value of type T.
public final classThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy.Static
-
Method Summary
-
-
Method Detail
-
auto
final Optional<JsonValue> auto()
The default strategy. This strategy currently uses a
max_chunk_size_tokensof800andchunk_overlap_tokensof400.
-
static_
final Optional<ThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy.Static> static_()
-
asAuto
final JsonValue asAuto()
The default strategy. This strategy currently uses a
max_chunk_size_tokensof800andchunk_overlap_tokensof400.
-
asStatic
final ThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy.Static asStatic()
-
accept
final <T extends Any> T accept(ThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = chunkingStrategy.accept(new ChunkingStrategy.Visitor<Optional<String>>() { @Override public Optional<String> visitAuto(JsonValue auto) { return Optional.of(auto.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final ThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofAuto
final static ThreadCreateAndRunParams.Thread.ToolResources.FileSearch.VectorStore.ChunkingStrategy ofAuto()
The default strategy. This strategy currently uses a
max_chunk_size_tokensof800andchunk_overlap_tokensof400.
-
-
-
-