Class TokenizationConfig
java.lang.Object
co.elastic.clients.elasticsearch.ml.TokenizationConfig
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<TokenizationConfig.Kind,java.lang.Object>
@JsonpDeserializable public class TokenizationConfig extends java.lang.Object implements TaggedUnion<TokenizationConfig.Kind,java.lang.Object>, JsonpSerializable
Tokenization options stored in inference configuration
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTokenizationConfig.Builderstatic classTokenizationConfig.KindTokenizationConfigvariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TokenizationConfig>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description TokenizationConfig(TokenizationConfigVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()TokenizationConfig.Kind_kind()Get the of the kind of variant held by this object.NlpBertTokenizationConfigbert()Get thebertvariant value.booleanisBert()Is this variant instance of kindbert?booleanisMpnet()Is this variant instance of kindmpnet?booleanisRoberta()Is this variant instance of kindroberta?NlpBertTokenizationConfigmpnet()Get thempnetvariant value.static TokenizationConfigof(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)NlpRobertaTokenizationConfigroberta()Get therobertavariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupTokenizationConfigDeserializer(ObjectDeserializer<TokenizationConfig.Builder> op)java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<TokenizationConfig.Kind,java.lang.Object>
-
of
public static TokenizationConfig of(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn) -
isBert
public boolean isBert()Is this variant instance of kindbert? -
bert
Get thebertvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thebertkind.
-
isMpnet
public boolean isMpnet()Is this variant instance of kindmpnet? -
mpnet
Get thempnetvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thempnetkind.
-
isRoberta
public boolean isRoberta()Is this variant instance of kindroberta? -
roberta
Get therobertavariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of therobertakind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setupTokenizationConfigDeserializer
protected static void setupTokenizationConfigDeserializer(ObjectDeserializer<TokenizationConfig.Builder> op)
-