Class TokenTextSplitterServiceSettings
- Namespace
- FoundationaLLM.Common.Models.Configuration.Text
- Assembly
- FoundationaLLM.Common.dll
Provides configuration settings that control token-based text splitting.
public record TokenTextSplitterServiceSettings : IEquatable<TokenTextSplitterServiceSettings>
- Inheritance
-
TokenTextSplitterServiceSettings
- Implements
- Inherited Members
- Extension Methods
Constructors
TokenTextSplitterServiceSettings(string, string, int, int)
Provides configuration settings that control token-based text splitting.
public TokenTextSplitterServiceSettings(string Tokenizer, string TokenizerEncoder, int ChunkSizeTokens, int OverlapSizeTokens)
Parameters
Tokenizer
stringThe tokenizer used to split the test into tokens.
TokenizerEncoder
stringThe name of the encoder used for tokenization.
ChunkSizeTokens
intThe target size in tokens for the resulting text chunks.
OverlapSizeTokens
intTeh target size in tokens for the overlapping parts of the adjacent text chunks.
Properties
ChunkSizeTokens
The target size in tokens for the resulting text chunks.
public int ChunkSizeTokens { get; init; }
Property Value
OverlapSizeTokens
Teh target size in tokens for the overlapping parts of the adjacent text chunks.
public int OverlapSizeTokens { get; init; }
Property Value
Tokenizer
The tokenizer used to split the test into tokens.
public string Tokenizer { get; init; }
Property Value
TokenizerEncoder
The name of the encoder used for tokenization.
public string TokenizerEncoder { get; init; }
Property Value
Methods
FromDictionary(Dictionary<string, string>)
Creates and instance of the class based on a dictionary.
public static TokenTextSplitterServiceSettings FromDictionary(Dictionary<string, string> settings)
Parameters
settings
Dictionary<string, string>The dictionary containing the settings.
Returns
- TokenTextSplitterServiceSettings
A TokenTextSplitterServiceSettings instance initialized with the values from the dictionary.