Package com.google.genai.types
Class WhiteSpaceConfig
-
- All Implemented Interfaces:
public abstract class WhiteSpaceConfig extends JsonSerializable
Configuration for a white space chunking algorithm.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classWhiteSpaceConfig.BuilderBuilder for WhiteSpaceConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description WhiteSpaceConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<Integer>maxTokensPerChunk()Maximum number of tokens per chunk. abstract Optional<Integer>maxOverlapTokens()Maximum number of overlapping tokens between two adjacent chunks. static WhiteSpaceConfig.Builderbuilder()Instantiates a builder for WhiteSpaceConfig. abstract WhiteSpaceConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static WhiteSpaceConfigfromJson(String jsonString)Deserializes a JSON string to a WhiteSpaceConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
maxTokensPerChunk
abstract Optional<Integer> maxTokensPerChunk()
Maximum number of tokens per chunk.
-
maxOverlapTokens
abstract Optional<Integer> maxOverlapTokens()
Maximum number of overlapping tokens between two adjacent chunks.
-
builder
static WhiteSpaceConfig.Builder builder()
Instantiates a builder for WhiteSpaceConfig.
-
toBuilder
abstract WhiteSpaceConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static WhiteSpaceConfig fromJson(String jsonString)
Deserializes a JSON string to a WhiteSpaceConfig object.
-
-
-
-