Class VectorStoreStaticChunkingStrategyOptions
java.lang.Object
com.azure.ai.openai.assistants.models.VectorStoreStaticChunkingStrategyOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VectorStoreStaticChunkingStrategyOptions>
public final class VectorStoreStaticChunkingStrategyOptions
extends Object
implements com.azure.json.JsonSerializable<VectorStoreStaticChunkingStrategyOptions>
Options to configure a vector store static chunking strategy.
-
Constructor Summary
ConstructorsConstructorDescriptionVectorStoreStaticChunkingStrategyOptions
(int maxChunkSizeTokens, int chunkOverlapTokens) Creates an instance of VectorStoreStaticChunkingStrategyOptions class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of VectorStoreStaticChunkingStrategyOptions from the JsonReader.int
Get the chunkOverlapTokens property: The number of tokens that overlap between chunks.int
Get the maxChunkSizeTokens property: The maximum number of tokens in each chunk.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VectorStoreStaticChunkingStrategyOptions
public VectorStoreStaticChunkingStrategyOptions(int maxChunkSizeTokens, int chunkOverlapTokens) Creates an instance of VectorStoreStaticChunkingStrategyOptions class.- Parameters:
maxChunkSizeTokens
- the maxChunkSizeTokens value to set.chunkOverlapTokens
- the chunkOverlapTokens value to set.
-
-
Method Details
-
getMaxChunkSizeTokens
public int getMaxChunkSizeTokens()Get the maxChunkSizeTokens property: The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096.- Returns:
- the maxChunkSizeTokens value.
-
getChunkOverlapTokens
public int getChunkOverlapTokens()Get the chunkOverlapTokens property: The number of tokens that overlap between chunks. The default value is 400. Note that the overlap must not exceed half of max_chunk_size_tokens. *.- Returns:
- the chunkOverlapTokens value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<VectorStoreStaticChunkingStrategyOptions>
- Throws:
IOException
-
fromJson
public static VectorStoreStaticChunkingStrategyOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VectorStoreStaticChunkingStrategyOptions from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of VectorStoreStaticChunkingStrategyOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the VectorStoreStaticChunkingStrategyOptions.
-