Package org.apache.camel.model.tokenizer
Class LangChain4jTokenizerDefinition
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.TokenizerImplementationDefinition
org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition
- All Implemented Interfaces:
CopyableDefinition<TokenizerImplementationDefinition>
- Direct Known Subclasses:
LangChain4jCharacterTokenizerDefinition,LangChain4jLineTokenizerDefinition,LangChain4jParagraphTokenizerDefinition,LangChain4jSentenceTokenizerDefinition,LangChain4jWordTokenizerDefinition
@Metadata(firstVersion="4.8.0",
label="eip,transformation,ai",
title="LangChain4J Tokenizer")
public class LangChain4jTokenizerDefinition
extends TokenizerImplementationDefinition
Tokenizer that uses LangChain4j for tokenization.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionMakes a copy of this definition.Gets the maximum number of tokens that can overlap in each segmentThe maximum number of tokens on each segmentGets the tokenizer typevoidsetMaxOverlap(String maxOverlap) Sets the maximum number of tokens that can overlap in each segmentvoidsetMaxTokens(String maxTokens) Sets the maximum number of tokens on each segmentvoidsetTokenizerType(String tokenizerType) Sets the tokenizer typeprotected static StringMethods inherited from class org.apache.camel.model.TokenizerImplementationDefinition
configuration, setConfiguration, setTokenizerName, tokenizerNameMethods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
LangChain4jTokenizerDefinition
public LangChain4jTokenizerDefinition() -
LangChain4jTokenizerDefinition
-
-
Method Details
-
getMaxTokens
The maximum number of tokens on each segment -
setMaxTokens
Sets the maximum number of tokens on each segment -
getMaxOverlap
Gets the maximum number of tokens that can overlap in each segment -
setMaxOverlap
Sets the maximum number of tokens that can overlap in each segment -
getTokenizerType
Gets the tokenizer type -
setTokenizerType
Sets the tokenizer type -
copyDefinition
Description copied from interface:CopyableDefinitionMakes a copy of this definition.- Specified by:
copyDefinitionin interfaceCopyableDefinition<TokenizerImplementationDefinition>- Overrides:
copyDefinitionin classTokenizerImplementationDefinition
-
toName
-