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 thebert
variant value.bertJa()
Get thebert_ja
variant value.boolean
isBert()
Is this variant instance of kindbert
?boolean
isBertJa()
Is this variant instance of kindbert_ja
?boolean
isMpnet()
Is this variant instance of kindmpnet
?boolean
Is this variant instance of kindroberta
?boolean
Is this variant instance of kindxlm_roberta
?mpnet()
Get thempnet
variant value.static TokenizationConfig
roberta()
Get theroberta
variant value.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
toString()
Get thexlm_roberta
variant value.
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
TokenizationConfig
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<TokenizationConfig.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in 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 thebert
variant value.- Throws:
IllegalStateException
- if the current variant is not of thebert
kind.
-
isBertJa
public boolean isBertJa()Is this variant instance of kindbert_ja
? -
bertJa
Get thebert_ja
variant value.- Throws:
IllegalStateException
- if the current variant is not of thebert_ja
kind.
-
isMpnet
public boolean isMpnet()Is this variant instance of kindmpnet
? -
mpnet
Get thempnet
variant value.- Throws:
IllegalStateException
- if the current variant is not of thempnet
kind.
-
isRoberta
public boolean isRoberta()Is this variant instance of kindroberta
? -
roberta
Get theroberta
variant value.- Throws:
IllegalStateException
- if the current variant is not of theroberta
kind.
-
isXlmRoberta
public boolean isXlmRoberta()Is this variant instance of kindxlm_roberta
? -
xlmRoberta
Get thexlm_roberta
variant value.- Throws:
IllegalStateException
- if the current variant is not of thexlm_roberta
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
setupTokenizationConfigDeserializer
protected static void setupTokenizationConfigDeserializer(ObjectDeserializer<TokenizationConfig.Builder> op)
-