Class TokenizationConfig
java.lang.Object
co.elastic.clients.elasticsearch.ml.TokenizationConfig
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<TokenizationConfig.Kind,Object>
@JsonpDeserializable
public class TokenizationConfig
extends Object
implements TaggedUnion<TokenizationConfig.Kind,Object>, JsonpSerializable
Tokenization options stored in inference configuration
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final TokenizationConfig.Kind_kind()Get the of the kind of variant held by this object.bert()Get thebertvariant value.bertJa()Get thebert_javariant value.booleanisBert()Is this variant instance of kindbert?booleanisBertJa()Is this variant instance of kindbert_ja?booleanisMpnet()Is this variant instance of kindmpnet?booleanIs this variant instance of kindroberta?booleanIs this variant instance of kindxlm_roberta?mpnet()Get thempnetvariant value.static TokenizationConfigroberta()Get therobertavariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()Get thexlm_robertavariant value.
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
TokenizationConfig
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<TokenizationConfig.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<TokenizationConfig.Kind,Object>
-
of
public static TokenizationConfig of(Function<TokenizationConfig.Builder, ObjectBuilder<TokenizationConfig>> fn) -
isBert
public boolean isBert()Is this variant instance of kindbert? -
bert
Get thebertvariant value.- Throws:
IllegalStateException- if the current variant is not of thebertkind.
-
isBertJa
public boolean isBertJa()Is this variant instance of kindbert_ja? -
bertJa
Get thebert_javariant value.- Throws:
IllegalStateException- if the current variant is not of thebert_jakind.
-
isMpnet
public boolean isMpnet()Is this variant instance of kindmpnet? -
mpnet
Get thempnetvariant value.- Throws:
IllegalStateException- if the current variant is not of thempnetkind.
-
isRoberta
public boolean isRoberta()Is this variant instance of kindroberta? -
roberta
Get therobertavariant value.- Throws:
IllegalStateException- if the current variant is not of therobertakind.
-
isXlmRoberta
public boolean isXlmRoberta()Is this variant instance of kindxlm_roberta? -
xlmRoberta
Get thexlm_robertavariant value.- Throws:
IllegalStateException- if the current variant is not of thexlm_robertakind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-
setupTokenizationConfigDeserializer
protected static void setupTokenizationConfigDeserializer(ObjectDeserializer<TokenizationConfig.Builder> op)
-